简体   繁体   中英

How to show user location on custom map?

I want to show user location and other object location on custom map as follows :

For that I have Googled the things that says "we need to convert the lat long data in to XY Coordinates in the image and then we need to show it on image"

Other option I found is geocode the image to show the location data.

I didn't find anything else other than this. Can anyone please guide me to show user current location on the custom map as follows?

For translating your lattitude and longitute you should know the projection of your custom map. Then you can use PROJ.4 open source library to convert them. Or you can hardcode translation function to you app. For example, here at GitHub you may found code to translate from lat&lon to EPSG:900913 (google mercator projection)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM