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) .......





The question is what have you tried so far...
– Louys Patrice Bessette
Aug 21 at 16:44





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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)