On 7/6/2012 12:22 AM, Tue Topholm wrote:
Hi guys

Is there a way to get the url for each tile in a tileCache layer. I
know there is the getFullRequestString, but then I need to build it
myself, is there another way to do it, or should I just copy the
getURL, that is in the class.

If it's a subclass of Layer.Grid then yes, you can iterate over layer.grid and get a 2-dimensional list of tiles.

Each Tile has a .url attribute. If you're interested in a specific Tile at a location, check a Tile's .bounds or .position and .size

For an example of iterating over a Layer's Tiles, check out:
http://trac.osgeo.org/openlayers/wiki/TileStitchingPrinting
It doesn't do the location filtering I mention, but could be a good start.

--
Greg Allensworth, Web GIS Developer
BS  A+  Network+  Security+  Linux+  Server+
GreenInfo Network - Information and Mapping in the Public Interest
564 Market Street, Suite 510  San Francisco CA 94104
PH: 415-979-0343 x302  FX: 415-979-0371    email: [email protected]
Web: www.GreenInfo.org     www.MapsPortal.org

Subscribe to MapLines, our e-newsletter, at www.GreenInfo.org


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to