[Mapserver-users] How to ignore a non-existent layer?

Puneet Kishor pkishor at geoanalytics.com
Thu Aug 28 19:47:35 EDT 2003


Well, STATUS off solves the problem only partially. There is still no
correlation between what is in the mapfile and what is on the hard-disk.
If I build a widget to turn layers on/off by using the layer defs in the
Mapfile, I could still end up trying to turn on a layer that doesn't
exist.

I could search the layers on the hard-disk and try and match them with
the layers defined in the mapfile... But the names of the layers on the
hard-disk could be different from the names of the layers in the
mapfile... I would have to match the data file names.

Building the layers from scratch with Mapscript is not an option because
defining each class and its colors and values would be very cumbersome.

Seems, a simple solution would be to simply have Mapserver ignore
non-existent layers (with a switch to set this to "strict" or not --
that is, to ignore or croak).

Am I correct in assuming there is no such simple switch?

If not, how would others tackle this problem... Besides simply turning
STATUS off.

All ideas appreciated.

Many thanks.

> -----Original Message-----
> From: Matt Doggett [mailto:mdoggett at coas.oregonstate.edu] 
> Sent: Thursday, August 28, 2003 6:04 PM
> To: Puneet Kishor
> Subject: RE: [Mapserver-users] How to ignore a non-existent layer?
> 
> 
> Try setting the layer STATUS to OFF.    I use this to define several
> 'generic' layers in my mapfile (with non-existing data), then through
> PHP/Mapscript dynamically define the data that the layer references.
> 
> Matt
> 
> 
> -----Original Message-----
> From: mapserver-users-admin at lists.gis.umn.edu
> [mailto:mapserver-users-admin at lists.gis.umn.edu] On Behalf Of 
> pkishor_98
> Sent: Thursday, August 28, 2003 3:21 PM
> To: mapserver-users at lists.gis.umn.edu
> Subject: [Mapserver-users] How to ignore a non-existent layer?
> 
> I have a mapfile with a bunch of layers and their classes defined. I
> want MapServer to NOT croak if a layer defined in the mapfile doesn't
> exist... just silently ignore it. Is there a way to do that?
> 
> Thanks.
> 
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 
> 




More information about the mapserver-users mailing list