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

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jul 31 10:43:14 PDT 2012


I'm not sure if this will help, but have you tried using:

MAP
     ...
     CONFIG ON_MISSING_DATA "IGNORE"
     ...

-Steve W

On 7/31/2012 1:14 PM, Paolo Corti wrote:
> Hi
>
>> 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.
>>
>
> I maybe wrong, but I do not think there is a way to manage this from MapServer.
> As you are using mapscript to compose the map, you could check it out
> by code the correct response, and only in that case add the layer to
> the map.
> Another possible approach, if applicable (the data are not changing
> too often) could be to cache the WMS with a tile server, and use the
> tiles instead than WMS, with the big plus of having better performance
> as well.
>
> best regards
> p
>



More information about the mapserver-users mailing list