[OpenLayers-Users] Error messages displayed on the map

Duong Minh-Tri duong.minh-tri at ext.jrc.ec.europa.eu
Wed Jun 8 10:21:28 EDT 2011


Hi all,
 
I am trying to add a WMS layer to the map. Sometimes the WMS service doesn't
work properly and the layer can't be displayed properly. But on the map I
see the pink tiles and the error message for each tile: 
"code="internalError"Rendering process failed
Unable to obtain connection: Cannot get a connection, pool error Timeout
waiting for idle object"
I think those error messages comes from WMS service and I am not able to fix
those error. However, at least I don't want display them on the map. I want
to display instead other message, shorter and more friendly to user, and not
on the map. 
 
I've tried to overwrite OpenLayers.Util.onImageLoadError by a blank
function. Then no pink tiles are displayed, but the text error messages
still there. 
I also check the GetMapRequest generated by OpenLayers. This is one of them:
http://kartta.liikennevirasto.fi/maaliikenne/ows?SERVICE=WMS
<http://kartta.liikennevirasto.fi/maaliikenne/ows?SERVICE=WMS&amp;&LAYERS=ka
tselupalvelu%3Adigiroad&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=appl
ication%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4326&BBOX=0,-90,
90,0&WIDTH=256&HEIGHT=256>
&amp;&LAYERS=katselupalvelu%3Adigiroad&VERSION=1.1.1&REQUEST=GetMap&STYLES=&
EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&SRS=EPSG%3A4
326&BBOX=0,-90,90,0&WIDTH=256&HEIGHT=256
When I view this link on Firefox (when server has some problems and return
errors), it displays a transparent image together with the error message
inside. But the image does not contain the message (I check by saving the
image and viewing) The image is just a small transparent blank image. So the
message comes to Firefox in a secret way I don't know.
 
I guess that the WMS service still returns an image to OpenLayers, so
OpenLayers.Util.onImageLoadError can't trigger. But it returns some error
message together with the image. Maybe OpenLayers can receive those message
as well and display them. But how can I detect when it happens and prevent
OpenLayers to display those error messages?
 
Any help is appreciated. 
 
Thanks,
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110608/b04e4c0d/attachment.html


More information about the Users mailing list