tiles outside of extent

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tiles outside of extent

Bart van den Eijnden (OSGIS)-2
Hi list,

when requesting a tile which is outside of the maxExtent, I get the
following error:

An error occurred: couldn't calculate tile index for layer AAA216 from
([0.0, -58400.935286, 358400.93528600002, 300000.0])
  File "/var/www/cgi-bin/tilecache-1.6/TileCache/Service.py", line 401, in
modPythonHandler
    host )
  File "/var/www/cgi-bin/tilecache-1.6/TileCache/Service.py", line 380, in
dispatchRequest
    tile = WMS(self).parse(params, path_info, host)
  File "/var/www/cgi-bin/tilecache-1.6/TileCache/Service.py", line 115, in
parse
    return self.getMap(param)
  File "/var/www/cgi-bin/tilecache-1.6/TileCache/Service.py", line 122, in
getMap
    raise Exception(

which results in a red cross image in OpenLayers.

Is there a way to get around this? Maybe have blank images returned?

Best regards,
Bart

--
Bart van den Eijnden
OSGIS, Open Source GIS
http://www.osgis.nl





_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache
Reply | Threaded
Open this post in threaded view
|

Re: tiles outside of extent

Christopher Schmidt-2
On Mon, Apr 23, 2007 at 02:11:41PM +0200, Bart van den Eijnden (OSGIS) wrote:
> Hi list,
>
> when requesting a tile which is outside of the maxExtent, I get the
> following error:

That's a different error than I'd expect. Typically, I'd expect the
error to be something like:

"Lower left (%f, %f) is outside layer bounds" % (minx, miny))

I'd accept a patch to make these transparent images, or to read a single
file specified on the layer as a 'broken image' tile.

What I usually do is something like:

OpenLayers.Tile.Image.prototype.checkImgURL  = function() {}
OpenLayers.Util.onImageLoadError = function() {  
    this.style.display = "";
    this.src="./nodata.png";
}

Which says:
 * Don't check the image URL
 * If an image fails to load, use the nodata image.

Regards,
--
Christopher Schmidt
MetaCarta
_______________________________________________
Tilecache mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/tilecache