[mapserver-users] Mapserver Legend using html template

2012-05-30 Thread Paul Maddock
Dear All,

I'm currently trying to make mapserver show in a legend different classes in 
the same layer.  Right now the classes are rendered using the same shape 
(point) and different colors correctly based on expressions in each class of 
the layer.  The legend works correctly when I turn on another line layer 
without classes.

Below I've included snippets (Legend tag, layer tag) from my mapfile, and one 
from my html template.  Maybe you can tell me what I'm doing wrong because I 
cannot find any discrepancies between what the documentation says to do and 
what I have.

Here is the Legend tag in my mapfile:
LEGEND
STATUS ON
POSITION LR
IMAGECOLOR 237 248 177
END

Here is a sample from the layer I'm trying to put into the legend
LAYER
NAME "jobstatus"
   STATUS ON
   #GROUP "default"
   TYPE POINT
   CONNECTIONTYPE postgis
   CONNECTION "host=localhost dbname=jobstatus2012 
user=*password=** port=5432"
   #MAXSCALEDENOM 1
   DATA "geom from statusb5_19_2012 using unique proposal_n 
using srid=3754"
   PROJECTION
"init=epsg:3754"
END
   CLASSITEM 'proposal_n'
   LABELITEM 'proposal_n'
   CLASSGROUP "status"
CLASS
NAME "status1"
GROUP "status1"
EXPRESSION ( '[current_st]' eq 'Remediation')
STYLE
SYMBOL "circle"
COLOR 96 225 9
OUTLINECOLOR 96 225 9
SIZE 3
END
LABEL
COLOR 0 0 0
OUTLINECOLOR 0 
0 0
POSITION AUTO
END
END

CLASS
NAME "status2"
GROUP "status2"
EXPRESSION ( '[current_st]' eq 'New Proposal')
STYLE
SYMBOL "circle"
COLOR 251 240 28
OUTLINECOLOR 251 240 28
SIZE 3
END
LABEL
COLOR 0 0 0
OUTLINECOLOR 0 
0 0
POSITION AUTO
END
END

CLASS
NAME "status3"
GROUP "status3"
EXPRESSION ( '[current_st]' eq 'Data 
Collection')
STYLE
SYMBOL "circle"
COLOR 39 29 250
OUTLINECOLOR 39 29 250
SIZE 3
END
LABEL
COLOR 0 0 0
OUTLINECOLOR 0 
0 0
POSITION AUTO
END
END

Finally here is a sample from my html template


Thanks to anyone who can help!



Paul A. Maddock
Mapping Technician
IJUS LLC
560 Officenter Place
Gahanna, OH 43230
Cell: (513) 404-6476
[cid:image001.gif@01CD3E74.0915E250]

<>___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver Legend using html template

2012-05-30 Thread Jeff McKenna
On 12-05-30 6:30 PM, Paul Maddock wrote:
> Dear All,
> 
>  
> 
> I’m currently trying to make mapserver show in a legend different
> classes in the same layer.  Right now the classes are rendered using the
> same shape (point) and different colors correctly based on expressions
> in each class of the layer.  The legend works correctly when I turn on
> another line layer without classes. 
> 
>  
> 
> Below I’ve included snippets (Legend tag, layer tag) from my mapfile,
> and one from my html template.  Maybe you can tell me what I’m doing
> wrong because I cannot find any discrepancies between what the
> documentation says to do and what I have.

Hi Paul,

Are you referring to an HTML Legend Template?
http://www.mapserver.org/output/html_legend.html

Or maybe I am misunderstanding your question.

-jeff




-- 
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users


Re: [mapserver-users] Mapserver Legend using html template

2012-05-31 Thread paulmaddock
At this point I just wanted mapserver to generate a legend without building
an html template.

As you can tell in my code, I have a layer with many classes.  The mapserver
legend image generator will create an image for the other layers which only
have a single class.  

--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/Mapserver-Legend-using-html-template-tp4978154p4978413.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users