I hope to see this fixed in 6.0. There was a attribute named 'title' added to classes years ago but it's never been hooked up...
Steve ________________________________________ From: [email protected] [[email protected]] On Behalf Of Fawcett, David (MPCA) [[email protected]] Sent: Wednesday, January 27, 2010 9:05 AM To: [email protected]; [email protected] Subject: RE: [mapserver-users] De-coupling legend from class name Nick, Just as you did with 'style[0]', you can reference a layer or class by it's numeric index. This gives you the flexibility to change the class name, but now you need to know which class it is based on order (index). http://mapserver.org/cgi/controls.html?highlight=Example%203#using-mapserver-version-5 This is for MapServer version 5.0 or greater. David. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of [email protected] Sent: Wednesday, January 27, 2010 7:03 AM To: [email protected] Subject: [mapserver-users] De-coupling legend from class name Hello, It's been a while since I've been using MS and I have the following q or observation. AFAIU, MS only supports run-time substitution for the following parameters * LAYER: DATA (must validate against DATAPATTERN) * LAYER: TILEINDEX * LAYER: CONNECTION * LAYER: FILTER * CLASS EXPRESSION Layer color is not in this list. So, in order to permit a user to change the layer colors of his map I am using the map_object_property type syntax passed to the cgi as, for example when using a select for picking colors... <input type="checkbox" name="layer" value="TOWNS" hecked="checked">TOWNS; <select name="map.layer[TOWNS].class[VILLAGES].style[0]" id="VILLAGES" size=1 onChange="change_layer_color('TOWNS')"> blah, blah.. where I pass the color to style[0] While this works fine, I'm coupling my interface to the name of the class for the layer in question. Should I want for some reason change the class name from VILLAGES to NEIGHBORHOODS, (cause class name is coupled to the legend) I would have to change my template as well as the mapfile. This gets messy and is a bear to maintain.. Is there a better way of doing this, or decouple legend name from the class name regards, nick _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
