[OpenLayers-Users] Downloading tiles to local file system
Jon Britton
jonbritton3 at gmail.com
Thu Jul 26 02:44:27 PDT 2012
Hi,
We are trying to develop a mobile application using PhoneGap and OpenLayers
that will allow a certain amount of offline access. For this, we wish to
cache tiles to the local hard disk.
We want to do the following:
1. Download tiles for a couple of zoom levels centered on a set of
lat/lon points (e.g. 5 x 5 tiles at zoom level 2, 5 x 5 tiles at zoom level
3).
2. Store these tiles using the normal directory structure on the local
disk.
3. Access these tiles using OpenLayers when offline.
Now, as we're using PhoneGap I think the 3rd part is easy as we have access
to the local hard disk. We can just point OpenLayers to the tile directory
on the local disk as if it was a normal TMS. Is this correct?
What's really causing problems though are steps 1 and 2. I don't really
understand how to convert a lat/lon into a set of tile URLs in this way!
What I'd really like is a method that given a lat/lon will return an array
of tile URLs. I can then use the PhoneGap file system API to save these to
the local disk.
If anybody can help me get started with this it would be greatly
appreciated :-)
Cheers,
Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120726/6dfad4dc/attachment.html>
More information about the Users
mailing list