[OpenLayers-Users] mapserver CGI layer type?

Stephen Woodbridge woodbri at swoodbridge.com
Sat Feb 24 17:43:52 EST 2007


Christopher,

Thanks, the patch works great. OL really is great. I love how it does 
most everything I want it to even if I can't find it in the docs.

Another question, is it possible to get Layer.MapServer to work without 
tiles, for example just to return the image of the viewport, then when 
you pan have it replace the old image.

I have also been getting errors in Firebug:

this.map has no properties
onImageLoad()OpenLayers.js (line 101)
bindAsEventListener(load )
OpenLayers.Util.onImageLoad=function(){if(!this.viewRequestID||(this.viewRequestID==this.map.viewRequestID)){this.style.backgroundColor=null;this.style.display="";}};OpenLayers.Util.onImageLoadErrorColor="pink";OpenLayers.IMAGE_RELOAD_ATTEMPTS=0;OpenLayers.Util.onImageLoadError=function(){this._attempts=(this._attempts)?(this._attempts+1):1;if(this._attempts<=OpenLayers.IMAGE_RELOAD_ATTEMPTS){this.src=this.src;}else{this.style.backgroundColor=OpenLayers.Util.onImageLoadErrorColor;}

It seems to be triggered by zooming before all tiles from the previous 
zoom have been loaded but seems to be pretty random. It is easy to 
reproduce but not on demand, like a case the happens every time.

Thanks,
-Steve

Christopher Schmidt wrote:
> On Fri, Feb 23, 2007 at 10:05:05PM -0500, Stephen Woodbridge wrote:
>> Hi all,
>>
>> Is there a mapserver CGI, (not WMS) layer type for OpenLayers?
>> I've been looking through the docs and examples and I'm not seeing it.
> 
> There is, but it's currently broken. The example is at
> http://openlayers.org/dev/examples/mapserver.html , the layer is called
> Layer.MapServer, and information on the bug is at 
> http://trac.openlayers.org/ticket/508
> 
> There is a patch in that ticket that fixes the MapServer layer, so long
> as you don't have any ","s in the non-Query String part of your URL.
> 
> To apply to patch:
> 
> wget http://openlayers.org/download/OpenLayers-2.3.tar.gz
> tar -zvxf OpenLayers-2.3.tar.gz
> cd OpenLayers-2.3
> wget -O mapserver.patch \
>    "http://trac.openlayers.org/attachment/ticket/508/mapserver.patch?format=raw"
> patch -p0 < mapserver.patch
> 
> Then, your copy of examples/mapserver.html will work correctly. 
> 
> I'll hopefully have a patch that doesn't affect URLs which already
> contain a "," before 2.4, so you shouldn't have to do this in the next
> version.
> 
> Regards,




More information about the Users mailing list