How to get LatLong using TileCoordinates
How to get LatLong using TileCoordinates
https://developers.google.com/maps/documentation/javascript/examples/map-coordinates
Above link shows how to convert lat long into Tile Coordinates (at certain zoom level); Now once I have those tile Coordinates (I need to call certain server side API with several different Tile Coordinates and their Lat/Long values).
So the question is how to convert Tile Coordinates to Lat/Long value (with reference to example shown in above mentioned link) ?
I have tried using "MercatorProjection" at other place and it works fine; but the formulas used in those cases are different than those mentioned in URL at the top.
function MercatorProjection() .........
MercatorProjection.prototype.fromDivPixelToLatLng = function(pixel, zoom) .......
MercatorProjection.prototype.fromDivPixelToSphericalMercator = function(pixel, zoom) .......
I am using MercatorProjection at other location but it has different formulas; tried reusing the same in this case as well but it didn't work. I have edited the question with some of its information.
– user10255838
Aug 21 at 17:17
1 Answer
1
I found the answer on below site
https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
It works in both JS & C# to convert between TileCoordinates and Latitude/Longitude.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
The question is what have you tried so far...
– Louys Patrice Bessette
Aug 21 at 16:44