[mapserver-users] How use style for distinguish the rendering for scales interval.
Andrea Peri
aperi2007 at gmail.com
Thu Mar 7 01:04:31 PST 2013
Here is an example of what it is returning.
(see attached image)
As you can see every element has a color fill and a black boundaries.
Instead the rendering in the map is for a class
with a double style.
in an interval of scale act a style with a coloured solid fill and a
white boundaries, and in another scale interval act another style with
a black boundary and no fill inside.
The getlegendgraphics result is the merge of both.
2013/3/5 Lime, Steve D (MNIT) <Steve.Lime at state.mn.us>:
> I dunno, I'm thinking the problem may lay in the legend code not respecting scale values. What exactly does your GetLegendGraphic call look like?
>
> Steve
>
> ________________________________________
> From: mapserver-users-bounces at lists.osgeo.org [mapserver-users-bounces at lists.osgeo.org] on behalf of Carlo Pelliconi [c.pelliconi at sis-ter.it]
> Sent: Tuesday, March 05, 2013 6:27 AM
> To: aperi2007 at gmail.com
> Cc: mapserver-users at lists.osgeo.org
> Subject: Re: [mapserver-users] How use style for distinguish the rendering for scales interval.
>
> Hi Andrea,
> If I remember well, the legend represents the class objects, so my
> advice is to create 2 different classes, with 1 style each one. Use the
> maxscaledenom statement in the class definition and not in the style.
> I hope it works.
>
> Bye, Carlo
>
> Il 04/03/2013 14:59, Andrea Peri ha scritto:
>> Hi,
>>
>> I have set a layer with a class and 2 style inside the class.
>> The first style is working in a specific sclae interval, the second
>> style is in another different scale interval.
>>
>> To do this I use this code:
>>
>> MAP
>> ...
>> CLASS
>> ....
>> MAXSCALEDENOM 4000000
>> MINSCALEDENOM 1
>> # the style A
>> STYLE
>> WIDTH 2.0
>> COLOR "#C5C9977F"
>> ANTIALIAS false
>> OPACITY 100
>> MAXSCALEDENOM 4000000
>> MINSCALEDENOM 100000
>> # the style B
>> STYLE
>> WIDTH 3.0
>> OUTLINECOLOR "#000000FF"
>> ANTIALIAS false
>> OPACITY 100
>> MAXSCALEDENOM 100000
>> MINSCALEDENOM 1
>> ....
>>
>> So in the scale interval 1:100.000 - 1:4.000.000 the geometry is with
>> a color fill and an outline
>> instead in the scale interval 1:1 - 1:100.00 the geometry is with only
>> an outline with width 3.
>>
>> But when I call the GetçLegendGraphics using a scale of 1:300.000
>>
>> Instead of a legend with the styleA only I have a legend-image with
>> styleA+styleB
>>
>> I'm using the mapserver 6.3dev.
>>
>> I guess there is some mistake on the styles definition but I don't find what.
>>
>> Any hint is welcome.
>>
>> thx,
>>
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: img1.gif
Type: image/gif
Size: 7975 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20130307/3d82ef42/attachment.gif>
More information about the MapServer-users
mailing list