mapserver as wms client - gracefully handling errors
Matthew Perry
perrygeo at GMAIL.COM
Mon Jul 24 11:08:28 PDT 2006
Hey folks,
I've set up a mapfile with a number of datasets plus the terraserver
wms. When browsing parts of the earth not covered by terraserver,
however, an in-image error message appears:
msDrawMap(): WMS connection error. Failed to draw WMS layer named
'Terraserver_DOQ'. This most likely happened because the
remote WMS server returned an invalid image, and XML exception or
another unexpected result in response to the GetMap request. Also
check and make sure that the layer's connection URL is valid.
I can get the wms client and my wms server to return xml instead of an
inline error but the real question is, how do I force mapserver to
simply ignore the cascaded wms when an error occurs so that it can
still render the other data in the mapfile without returning an
exception?
Here's my mapfile entry for reference:
LAYER
NAME "Terraserver_DOQ"
STATUS OFF
TYPE RASTER
GROUP "main"
CONNECTIONTYPE WMS
CONNECTION "http://terraservice.net/OgcMap.ashx?"
DEBUG ON
METADATA
"wms_srs" "EPSG:4326"
"wms_title" "Digital_Orthophoto"
"wms_name" "DOQ"
"wms_server_version" "1.1.1"
"wms_exceptions_format" "application/vnd.ogc.se_xml"
"wms_format" "image/jpeg"
"wms_layers" "doq"
END
MINSCALE 10000
MAXSCALE 40000
PROJECTION
"init=epsg:4326"
END
END
--
Matt Perry
perrygeo at gmail.com
http://www.perrygeo.net
More information about the MapServer-users
mailing list