[mapserver-users] How to handle unavailable data source in mapObj layer?

Anzel, Phil - NRCS, Fort Collins, CO Phil.Anzel at ftc.usda.gov
Tue Jul 31 09:11:23 PDT 2012


All,

We use MapServer via the SWIG interface for C#, loading a mapfile and rendering it with code similar to:
  mapscript.msLoadMapFromString(mapfile, null);
  imageObj io = mapObject.draw();

Our layers largely draw from database tables, lately we've started consuming remote WMS services and have found that these services are occassionally unavailable (such as reporting a "404" HTTP status). The "draw()" method throws an exception in such a case, reporting within the exception message the failing layer and the status.

Is there a way to change this behavior? We'd like a softer landing: could we define the "must have" layers and allow others to be drawn or skipped based upon data availability. We'd also want to be able to query the mapObj regarding each layer's success or failure.

Can this be done in MapServer 6.1-DEV?

Thanks,

- Phil Anzel, contractor for USDA/NRCS/ITC (Web Soil Survey Team)





This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120731/279a225c/attachment-0001.html>


More information about the mapserver-users mailing list