[OpenLayers-Users] Pre-seeding localStorage

Jurrie Overgoor jurrie at stijlxpres.nl
Thu May 9 02:13:19 PDT 2013


On 05/08/2013 04:46 PM, Greg Allensworth wrote:
> On 5/8/2013 6:30 AM, Jurrie Overgoor wrote:
>> My map is displaying a route with a maxExtend bounding box. I know this
>> bounding box beforehand. So I need a mechanism to translate a Bounds
>> object into tile urls for each zoom level. Maybe someone can push me in
>> the right direction, or even has an example that does something similar?
>
> Check out MobileMapStarter on Github. Look in cache.js specifically.
>
> It saves to file storage, which isn't quite the same, but it does 
> include the logic for translating a bounding box into a set of XYZ 
> tile URLs.
>
> https://github.com/gregallensworth/MobileMapStarter/blob/master/libs/cache.js 
>
>
> Look for seedCache()

Thanks Greg, this is more or less what I'm looking for! The only thing 
is that my bounds are in Spherical Mercator, and not in WGS84 Datum. 
Thus, the calculations would be somewhat different. Maybe you know a 
similar example with Spherical Mercator? (Actually, I think the 
calculations would be more simple, but I just can't seem to figure it out.)

With kind regards,

Jurrie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jurrie.vcf
Type: text/x-vcard
Size: 260 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130509/a40e2274/attachment.vcf>


More information about the Users mailing list