I am trying to make a pdf or UIImage as a map. Is there any way i can integrate Latitude and Longitude in a pdf so that i can show the current location on that pdf file?
I know how to show current location in google map. But i have totally no idea how to replace it with a pdf or UIImage.
Many Thanks
You’ll need to know the bounds of your image, and how it correlates to GPS. For example, if your image shows the range from latitude 33 degrees to 34 degrees, and longitude -112 to -113 degrees, then you can just map within this range. You also need to know how big your image is- let’s assume 1000×1000.
So, if you have a coordinate at, let’s say, 33.25 by -112.25, then your pixel position within the image would be 250,750.
The actual transform for a map is
In our example,
Same goes for Y, you just plug in Y everywhere you see X.
Hopefully this gets you on the right track.