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.jsLook 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
<<attachment: jurrie.vcf>>
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users