[Mapserver-users] Re: styleitem

Daniel Morissette morissette at dmsolutions.ca
Fri Aug 1 10:36:47 EDT 2003


Please use the mapserver-users list for your questions.  Others may have 
the same problem and learn from the questions/answer when reading the 
list or browsing/searching the archives.  Plus you increase your chances 
of getting a response since more eyes will see your question.  And 
finally that saves us from having to reply dozens of times to the same 
question via direct email.

See reply to your question below...

Jean-Baptiste RICHARD wrote:

> hi, i'm sorry to ask you this question but i don't understand one thing
> using styleitem "auto".
> The color of my .tab file are rendered, but i can't access a legend icon
> for each class.
> I read that it is a bug with mapserver 4.0, but could i make appear the
> legend icon if i only take one class (expression = '1' for instance)?
> In every case, my legend is empty and it seems to be a bit complicated
> if i have to make a nex legend for each layer .tab and colored in
> mapinfo.
> 
> Thanks for your help and sorry for my bad english,
> 
> RICHARD Jean-Baptiste
> 

Even if you set the style/color of class #1 in your layer it will be 
overwritten by the styleitem auto stuff and you won't get the expected 
legend icons.

But there's hope... a new KEYIMAGE class-level parameter has been added 
in 4.0 but haven't tried yet, that should allow you to specify the image 
to use for the legend icon.  There was an email sent about this on the 
list by Steve on July 29 but I don't see it in the list archives, I have 
attached a copy below.

BTW, KEYIMAGE isn't documented in the mapfile reference docs either...

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               morissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------

Steve Lime wrote:
> There is a new CLASS level parameter in 4.0 called KEYIMAGE that allows
> you to
> specify the legend image to use when building a legend (or requesting a
> legend
> icon via MapScript or the CGI application). You can see it in action
> at:
> 
>   http://maps.dnr.state.mn.us/mapserver_demos/workshop/
> 
> Turn on the DOQ layer and you'll see the KEYIMAGE in the legend. Note
> the the
> KEYIMAGE is sized to fit within the key specifications defined in the
> LEGEND section.
> 
> Steve





More information about the mapserver-users mailing list