[OpenLayers-Dev] Create a Map Tile Downloader
devdatta at tengshe.in
Tue Jul 15 04:29:37 PDT 2014
Based on your question on GIS.SE, and this one, I feel that you are
misunderstanding the Slippy map tile structure. The structure of the Tile
sets is fixed.
- For a particular zoom level, the x & y of the tiles goes from 0 to
- There are only integer zoomlevels (from 0 to 19...), and you can't get
zoomlevles in decimal values.
It is important to note that the formulas given on the linked page give the
coordinates for the NW-corner of the square.
If you want to download tiles, have a look at this gist which I've
successfully used in the past:
To successfully download tiles, you need to find which tiles intersect your
study area, and only download those. To find which tiles which intersect
your study area, you can use the bounding box of your polygon as the first
check. Find out which tiles contain your geometry by checking for tiles
that contain the top-left & Bottom-right of your bounding box. Your
Geometry will be guaranteed to be within these. After this, as a secondary
filter, you can check if your geometry intersects each tile before
downloading it, if required.
If this doesn't answer your question, you need to explain why you are
interested with partial zoom-levels and resolution.
On Mon, Jul 14, 2014 at 12:48 PM, Nakadale <lester_sherwin at hotmail.com>
> Hello! Can anyone help me with my problem? I'm trying to do a map tile
> downloader for my map app. problem is when I try to implement the formula
> from this site Slippy Map Tilenames
> tiles X and Y number that i get are off. Upon further trying to make it
> is for me to get the Zoom Level with decimal numbers. I wonder if there
> maybe other way to get the correct tiles aside from using Slippy Map
> Tilenames or if there can be a way to calculate the Zoom level with
> View this message in context:
> Sent from the OpenLayers Dev mailing list archive at Nabble.com.
> Dev mailing list
> Dev at lists.osgeo.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Dev