Is it possible to pinpoint my GPS location in my own image of a map instead of using newmapview?

Hi!

Ok, I´m done googling  <_<

I got a question about making an app where the clients image of a map is used instead of newmapview.

My client asked for an app where his map was displayed and he could pinch zoom in and out and rotate the map. I found this amazing tutorial that had all the codes I needed: https://coronalabs.com/blog/2013/01/22/implementing-pinch-zoom-rotate/

Now the client wonders IF it is possible to get the current GPS-location on the custom map.

I can track the x and y coordinates so it should be possible to translate and calculate them into longitude and latitude and add a pin on the current location…or am I wrong?  :unsure:

It could get messy if the user is able to zoom and rotate the map…I´m not sure.

I can´t wrap my head around this right now  :wacko:

Thanx!

-Tom

Yes its possible and not that complicated, you must make sure that your image is scale properly and know top/left and bottom/right GPS coordinate of your image. If you are trying to show a map with short distance, then you should not worry too much about accuracy.

Even if you are zooming, you can take into account the scaling factor when you compute your X and Y position. 

Good to know and thank you for great tips!

The map image is over a “smallish” area of about 20 kilometers by 20 kilometers. The size of the image has to be big to be able to zoom and still se details. The current image is 11000px times 11000px. I will have to make a tiled version of the image for it to work.

I got the client to understand that the ability to rotate the map is not needed. So now there is just the zooming part  :slight_smile:

Thanks again  :smiley:

Yes its possible and not that complicated, you must make sure that your image is scale properly and know top/left and bottom/right GPS coordinate of your image. If you are trying to show a map with short distance, then you should not worry too much about accuracy.

Even if you are zooming, you can take into account the scaling factor when you compute your X and Y position. 

Good to know and thank you for great tips!

The map image is over a “smallish” area of about 20 kilometers by 20 kilometers. The size of the image has to be big to be able to zoom and still se details. The current image is 11000px times 11000px. I will have to make a tiled version of the image for it to work.

I got the client to understand that the ability to rotate the map is not needed. So now there is just the zooming part  :slight_smile:

Thanks again  :smiley: