[mapserver-users] How use style for distinguish the rendering for scales interval.
Andrea Peri
aperi2007 at gmail.com
Wed Mar 6 00:59:43 PST 2013
Hi,
thx for response.
Infact it work it I create two distinct class element everyone with
its ownl minscale & maxscale.
But so why there is the minscale & maxscale available in the style section ?
I notice the map is effectively changed in its rendering style
changing the scale when I use
only one class and two distincts style with different scale.
Instead the getlegendgraphic merge both.
So perhaps is a bug.
But I'm not sure if it is really a bug because I don't understand how
this should be explained in the getcapabilites response.
Infact I guess the question is correlated to the getcapabilities response.
AFAIK is impossibile to return the right information about distinct
styles (for scale) in the same class in the getcapabilities response.
And this could explain why the getlegendgrahics is the merge of both
class-styles.
If this is true it is not a bug.
Is only the need to return a getlegendgraphics compliant with what is
write in the getcapabilites response.
Andrea.
2013/3/5 Carlo Pelliconi <c.pelliconi at sis-ter.it>:
> 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,
>>
>
>
--
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------
More information about the MapServer-users
mailing list