[mapserver-users] Re: annotations in mapserver 5.4
Raivo Alla
snaperski at gmail.com
Tue Sep 1 22:40:08 PDT 2009
Thank you for attention,
I checked my data source and since it was a polygon layer I generated
centroids out of them and
now it works.
Weird I did'nt noticed that before :S
Raivo
On Tue, Sep 1, 2009 at 6:32 PM, Steve Lime<Steve.Lime at dnr.state.mn.us> wrote:
> Can you get the scale value MapServer is using on a map where you think there should be
> annotation for this layer but there is not? Easiest way to do that is with a simple browse
> template like so:
>
> <!-- MapServer Template -->
> <img src="[img]"><br>
> Map extent: [mapext]<br>
> Scale: [scale]
>
> Note that you'll have to set IMAGEPATH and IMAGEURL in the WEB section of your mapfile. Then
> you can call the CGI like so:
>
> http://.../cgi-bin/mapserv?map=yourmap&mapext=extent where things go away&mode=browse
>
> If all goes well you should see the generated image and the computed extent and scale. I'd be
> curious to see those numbers on a problematic map for 5.2 and 5.4.
>
> Steve
>
>>>> On 9/1/2009 at 12:42 AM, in message
> <49dc012b0908312242h79cac72an73bbd1944dc8d42 at mail.gmail.com>, Raivo Alla
> <snaperski at gmail.com> wrote:
>> Thanks!
>>
>> You're right, I shortened the layer definition here confusingly, whole
>> layer definition was like that:
>>
>> LAYER
>> NAME alevikAnno_1
>> GROUP HYBRID
>> METADATA
>> "wms_title" "alevikAnno"
>> "wms_srs" "EPSG:3301"
>> "wms_extent" "355000 6360000 754000 6660000"
>> END
>> STATUS default
>> TYPE annotation
>> DATA "kohanimed/alevikud_1"
>> #sama andmestik, mis newages.
>> #Uuendamine vastavalt vajadusele.
>> #OPACITY 100
>> LABELITEM "TEXTSTRING"
>> CLASS
>> MAXSCALE 1333333 #1000000
>> MINSCALE 400000 #300000
>> STYLE
>> SYMBOL "punsoon3"
>> SIZE 15
>> END
>> LABEL
>> TYPE truetype
>> ANTIALIAS true
>> FONT "arial"
>> COLOR 255 255 255
>> SIZE 9
>> priority 6
>> encoding utf-8
>> force false
>> ANGLE auto
>> OUTLINECOLOR 25 25 25
>> POSITION cr
>> BUFFER 1
>> END
>> END
>> CLASS
>> MAXSCALE 400000 #300000
>> MINSCALE 200000 #150000
>> STYLE
>> SYMBOL "punsoon4"
>> SIZE 15
>> END
>> LABEL
>> TYPE truetype
>> ANTIALIAS true
>> FONT "arialb"
>> COLOR 255 255 255
>> SIZE 9
>> force false
>> ANGLE auto
>> priority 6
>> OUTLINECOLOR 25 25 25
>> POSITION cr
>> BUFFER 1
>> END
>> END
>> CLASS
>> MAXSCALE 200000 #150000
>> MINSCALE 66666 #50000
>> LABEL
>> TYPE truetype
>> ANTIALIAS true
>> FONT "arialb"
>> COLOR 255 255 255
>> SIZE 10
>> #force true
>> priority 8
>> ANGLE auto
>> OUTLINECOLOR 25 25 25
>> POSITION cc
>> BUFFER 3
>> END
>> END
>> CLASS
>> MAXSCALE 66666 #50000
>> MINSCALE 20000 #15000
>> LABEL
>> TYPE truetype
>> ANTIALIAS true
>> FONT "arialb"
>> COLOR 255 255 255
>> SIZE 11
>> #force true
>> priority 8
>> ANGLE auto
>> OUTLINECOLOR 25 25 25
>> POSITION cc
>> BUFFER 3
>> END
>> END
>> CLASS
>> MAXSCALE 20000 #15000
>> LABEL
>> TYPE truetype
>> ANTIALIAS true
>> FONT "arialb"
>> COLOR 255 255 255
>> SIZE 12
>> #force true
>> priority 8
>> ANGLE auto
>> OUTLINECOLOR 25 25 25
>> POSITION cc
>> BUFFER 3
>> END
>> END
>> END
>>
>> But problem still remains, even if I changed layer definition to
>> one-class only and with the scales defined in LAYER, not CLASS
>> section.
>>
>>
>> Raivo
>>
>> On Mon, Aug 31, 2009 at 9:16 PM, Steve Lime<Steve.Lime at dnr.state.mn.us> wrote:
>>> If you get rid of the class min/max scales do the problems go away? What if
>> you put those constraints
>>> at the layer level (with only one class that should work). Also, the layer
>> defn is confusing since it doesn't
>>> hint at a marker yet the images missing labels definitely do have a marker
>> accompanying the text.
>>>
>>> Steve
>>>
>>>>>> On 8/31/2009 at 5:23 AM, in message
>>> <49dc012b0908310323j7868aed2gea5cf8528a23e0f at mail.gmail.com>, Raivo Alla
>>> <snaperski at gmail.com> wrote:
>>>> This is a bit old problem (still got that bug), but I found that I
>>>> typed the second link not right, the right link to
>>>> the problematic output is that:
>>>> http://picasaweb.google.com/snaperski/Ort#5365984697960162578
>>>> I assume this is some 5.4 version bug?
>>>>
>>>> Sincerely,
>>>> Raivo
>>>>
>>>> On Tue, Aug 4, 2009 at 9:12 AM, Raivo Alla<snaperski at gmail.com> wrote:
>>>>> Hey,
>>>>>
>>>>> I got some weird behavior while trying to display labels with mapserver 5.4.
>>>>> With mapserver 5.0.3 these labels show up nicely:
>>>>> http://picasaweb.google.com/snaperski/Ort#5365984694609689634
>>>>> But with mapserver 5.4, these layers are shown at scale about
>>>>> 350000-200000, but they will disappear at higher scales, so nothing
>>>>> can be seen:
>>>>> http://picasaweb.google.com/snaperski/Ort#5365984694609689634
>>>>> This could'nt be collision conflict either as they have enough space to fit
>>>> in.
>>>>> Is something changed in the way mapserver treats annotations elements?
>>>>>
>>>>> Data source is a polygon shapefile: I hope that (polygon type) is not
>>>>> the problem?
>>>>> The layer itself in the mapfile:
>>>>>
>>>>> LAYER
>>>>> NAME alevikAnno_1
>>>>> GROUP HYBRID
>>>>> METADATA
>>>>> "wms_title" "alevikAnno"
>>>>> "wms_srs" "EPSG:3301"
>>>>> "wms_extent" "355000 6360000 754000 6660000"
>>>>> END
>>>>> STATUS default
>>>>> TYPE annotation
>>>>> DATA "kohanimed/alevikud_1"
>>>>> LABELITEM "TEXTSTRING"
>>>>> CLASS
>>>>> MAXSCALE 1333333
>>>>> MINSCALE 200000
>>>>> LABEL
>>>>> TYPE truetype
>>>>> ANTIALIAS true
>>>>> FONT "arial"
>>>>> COLOR 255 255 255
>>>>> SIZE 9
>>>>> priority 6
>>>>> force false
>>>>> ANGLE auto
>>>>> OUTLINECOLOR 25 25 25
>>>>> POSITION cr
>>>>> BUFFER 1
>>>>> END
>>>>> END
>>>>> END
>>>>>
>>>>>
>>>>>
>>>>> Raivo Alla
>>>>> Estonian Land Board
>>>>>
>>>> _______________________________________________
>>>> mapserver-users mailing list
>>>> mapserver-users at lists.osgeo.org
>>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list