How to get Location coordinate when touch the OsmTileLayer
Dev2210 opened this issue · 2 comments
Hi,Please anyone give some solution for this,I want to get Location coordinate of touched position in OsmTileLayer?
Hi man, i can't provide you any help right now. I just started looking to embed map stuff into unity for android app and during my research, i found some topics related to that so if you search on google, i am sure you will find some stuff.
You can also look into this link as it seems to be the opposite of what you want to do: https://ralphbarbagallo.com/2013/02/19/displaying-maps-in-unity3d/
The guy found the real life coordinates, converted them into UV coordinates and projected them into pixel to add them onto the static map. (not exactly like that but he explains better how to do it)
I guess if you do the opposite, you could get information of your input and convert them in the opposite way.
Cheers
If you're looking for WGS84 coordinates, I think you can use the GeoHelpers class:
static double[] RaycastHitToWGS84(MapBehaviour map, RaycastHit r)
It's not very clear from the original question what kind of coordinates you're looking for: world, WGS84, EPSG900913, ...