Hi there, We've finally achieved publishing our OpenLayers based GIS web application for our customers with GeoServer in the back-end. Everything works fine, well, almost .We've noticed that there is a worrying issue that affects navigation through the map when a SLD is applied to a WMS layer. This issue appears when the user opens the web application with IE6 and drags the map quickly. It seems that IE goes crazy, and shows the typical generic error message of javascript. If you click on yes button it shows the Just In time debugger and the execution stops in the folowing line:
For adding this layers on the fly I use this piece of code:
addWMSLayer: function(layerName,labelName,owsUrl, imageFormat){
//HACK IE
if (this._BROWSER_NAME == "Explorer"){
var layer = new OpenLayers.Layer.WMS.Post(
labelName,owsUrl,{layers: layerName, format: imageFormat, transparent:
'true'},{maxExtent: new OpenLayers.Bounds(460000, 4690000, 610000,
4820000),'buffer': 0, visibility: true,isBaseLayer: false, units: 'm',
reproject: false, opacity: 0.8} );
layer.transitionEffect = 'resize';
this.map.addLayers([layer]);
}else{
var layer = new OpenLayers.Layer.WMS(
labelName,owsUrl,{layers: layerName, format: imageFormat, transparent:
'true'},{maxExtent: new OpenLayers.Bounds(460000, 4690000, 610000, 4820000),
'buffer': 0, visibility: true,isBaseLayer: false, units: 'm', reproject: false,
opacity: 0.8} );
layer.transitionEffect = 'resize';
this.map.addLayers([layer])
}
}
Then I apply some SLD's generated on the fly with the following code
applyStyleToLayer: function(layerName,estilo){
if (estilo.SLD)
this.map.getLayersByName(layerName)[0].mergeNewParams({SLD: estilo.SLD});
else if (estilo.SLD_BODY)
this.map.getLayersByName(layerName)[0].mergeNewParams({SLD_BODY:
estilo.SLD_BODY});
else if(estilo.STYLES)
this.map.getLayersByName(layerName)[0].mergeNewParams({STYLES: estilo.STYLES});
}
You can test the behaviour through this URL:
http://www.iktlan.net/mapa/generaMapa.asp?sesion=AAD1058_19&ambito=MUNI
I'm using OpenLayers version 2.9.1.
Thanks in advance.
Un saludo,
··················································································
David Alda Fernández de Lezea
Lurralde eta Biodibertsitate Saila / Dpto. de Territorio y Biodiversidad
IKT
Granja Modelo s/n · 01192 · Arkaute (Araba)
··················································································
Tlfnos.: 945-00-32-95 Fax: 945-00.32.90
··················································································
email: [email protected] web: www.ikt.es
··················································································
<<Outlook.jpg>>
_______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
