[mapserver-users] dynamic class creation vs. static

Pushkar Pradhan pushkar at ERC.MsState.Edu
Tue Jun 11 17:23:41 EDT 2002


I have a list of layers (~30 or more), I need to display only certain
classes in each of these. There doesn't seem to be a criteria defined by
my client, just a word file containing the names.

Static:
Pasting the names of the classes in each layer in the .map file seems
boring, i.e. in cities layer he wants 30 cities to be displayed.
LAYER cities

CLASS1
CLASS2
...
CLASS30

END

similarly for all layers

Dynamic:
I can take the layer name and look it up in a text file which contains the
city names and then create all the classes in a loop:
for(no. of cities in the text file) {
   create new class obj.
   set attributes
}

Would the 1st approach be faster, I think in the 2nd approach the classes
will be created each time a user zooms in or adds more classes, please
advice. Thanks,


-Pushkar S. Pradhan




More information about the mapserver-users mailing list