Thanks, Cristiano. I’ll experiment with your approach. - Phil

From: Cristiano Sumariva [mailto:[email protected]]
Sent: Tuesday, July 31, 2012 1:58 PM
To: Anzel, Phil - NRCS, Fort Collins, CO
Subject: Re: [mapserver-users] How to handle unavailable data source in mapObj 
layer?

Hum I guess you will need grab each outOfHouseLayer using the map.getLayer 
method and invoke draw on each layer.
catching the exception. This way you can wait and retry, and give up some layer 
that did not answered removing it from mapObj.

Split the mapObj into inHouseLayers and in case of failure draw home layers 
only.
2012/7/31 Anzel, Phil - NRCS, Fort Collins, CO 
<[email protected]<mailto:[email protected]>>
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.

_______________________________________________
mapserver-users mailing list
[email protected]<mailto:[email protected]>
http://lists.osgeo.org/mailman/listinfo/mapserver-users

_______________________________________________
mapserver-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapserver-users

Reply via email to