Saturday 23 June 2018

Determine tile identity of tile set displayed on Google Maps/OpenStreetMap



I'm not sure if this is best way of approaching this, so I will explain where I'm coming from first.


I want to load data onto my webpage containing a map based off a lat/long point. The only way I know how to do this is to constantly be getting the a lat/lng point in the displayed map. Obviously this isn't very efficient since I either need to keep track of this point, or constantly be polling it. Each time I had the updated this point, I'd have to do some sort of processing to determine it's map location, which would add even more inefficiency. When I had that, I could then proceed to load my data.


My idea was that if I could pull down an id of map tiles of a particular region at a set zoom level, then I wouldn't need to do the crazy/complicated lat/lng processing. But, my stumbling block is that I don't know of any way this is possible.



Answer



So you want the Quadtile?


Google Map APi (v3) Quadtree visualized


enter image description here


http://koti.mbnet.fi/ojalesa/quadtree/quadtree_intro.htm


Credit to Esa


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...