[maplab-users] How do you display a layer by attribute?
Christopher R. Thorne
cthorne at dmsolutions.ca
Fri Jun 25 14:40:01 EDT 2004
Ken,
Your Question: In short how can I have a color for each class listed in
the legend under that particular layer?
In mapedit preview and gmap factory (ie. maplab) it is not flexible (a
side from going into the code of maplab, or editing your final outputted
gmap factory) in displaying classes within a mapfile.
The easiest way in maplab would be to set up a Layer for each defined
class you wish to display.
But if you want to build a web application that can handle legend
classes, I would personally use the chameleon technology found on
www.maptools.org. This allows you to personally configure your own web
application with the mapfile you created in mapedit, knowing little of
php_mapscript/mapserver.
If you are interested in Chameleon than the "Chameleon widget" That can
do the job for you would be the "LegendTemplate" Widget.
Chris
Ken Sanderson wrote:
>Following up my own question. I found a map file on the web and by
>looking at what they have done I noticed they had multiple classes,
>rather then multiple styles like I was trying. So I did a class for each
>value and an associated Style. It works fine as far as displaying the
>data, my question now is how do I make it so that the legend doesn't
>just show the top value for that layer? In short how can I have a color
>for each class listed in the legend under that particular layer?
>
>Thanks again,
>
>Ken
>
>-----Original Message-----
>From: maplab-users-bounces at lists.maptools.org
>[mailto:maplab-users-bounces at lists.maptools.org] On Behalf Of Ken
>Sanderson
>Sent: June 25, 2004 11:05 AM
>To: maplab-users at lists.maptools.org
>Subject: [maplab-users] How do you display a layer by attribute?
>
>
>Hello all.
>
>How do you set up a map file through map edit to display a layer by an
>attribute value. So for example if I have a field called TYPE and in
>that field you can have a value of 1-4. I then want to display all 1's
>as red, 2's as blue, 3's as green, 4's as yellow on the map.
>
>How do I go about setting that up? I assumed that I would set ClassItem
>to TYPE, but not sure how to go about defining a style object for each
>value type could be?
>
>Thanks,
>
>Ken
>
>
>_______________________________________________
>Maplab-users mailing list
>Maplab-users at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/maplab-users
>
>
>_______________________________________________
>Maplab-users mailing list
>Maplab-users at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/maplab-users
>
>
>
--
---------------------
Christopher R. Thorne
GIS Product Specialist,
DM Solutions Group Inc.
http://www.dmsolutions.ca
Email: cthorne at dmsolutions.ca
Phone: (613) 565-5056 ext.22
Fax : (613) 565-0925
More information about the Maplab-users
mailing list