[OpenLayers-Dev] GeoWebCache layer
Iván Sánchez Ortega
ivan at sanchezortega.es
Mon Nov 29 12:27:33 EST 2010
On Monday 29 November 2010 18:00:39 Tim Schaub wrote:
> On 11/23/10 12:40 AM, Bart van den Eijnden (OSGIS) wrote:
> > http://dev.openlayers.org/sandbox/tschaub/gwc/lib/OpenLayers/Layer/GeoWeb
> >Cache.js
>
> Yeah, sorry for not making this more public before. This has been in
> production use for a good while now. I'll bundle it up as a patch.
Don't you have problems while loading tiles with either a X or Y coordinate
equal to 1000? I found that GWC has a funky way of padding with zeroes (see
WTF at FilePathGenerator.java, line 106), so please consider adding this to
your patch:
zeropad: function(string, len)
{
// Workaround for stupid and nasty GeoWebCache (int) log10(foo+0.001) bug. */
if (string == '1000')
return '01000';
else if (string == '1001')
return '01001';
else if (string == '1002')
return '01002';
while (string.length < len)
string = '0' + string;
return string;
},
You may not have tiles with such coordinates, but I did :-)
Best,
--
----------------------------------
Iván Sánchez Ortega <ivan at sanchezortega.es> <ivan at geonerd.org>
Now listening to: Mo' Horizons - Remember Tomorrow (2001) - [6] Hit the Road
Jack (Pé na Estrada) (5:41) (90.833298%)
More information about the Dev
mailing list