[mapserver-users] RE: Labeling

Jay Kapalczynski jkapalczynski at ci.maple-grove.mn.us
Wed Aug 6 10:46:01 EDT 2008


That was it....moved the lines inside the LABEL CLASS....

Credit due to the GeoMoose Forum...(Dan)

But I do thank you all for your help...it is very appreciated.

Especially for Green coders like myself...

 

Thanks again Steve for your response

 

CLASS

      LABEL 

            PUT LINES HERE

      END

END 

 

 

 

-----Original Message-----
From: Steve Lime [mailto:Steve.Lime at dnr.state.mn.us] 
Sent: Wednesday, August 06, 2008 9:42 AM
To: Jay Kapalczynski; mapserver-users at lists.osgeo.org
Subject: Re: [mapserver-users] RE: Labeling

 

>From your example I can see that your "ANGLE" parameter is in the wrong
object it should be in the label object

to rotate the text. As is you should be throwing parsing errors. the
item storing the angle need not be numeric although the values must
represent numbers upon conversion.

 

Steve

 

>>> Jay Kapalczynski <jkapalczynski at ci.maple-grove.mn.us> 08/06/08 2:15
AM >>>

What I am trying to do is use annotation from a Geodatabase.  From what

I hear GeoMoose / Map Server will not read it.

 

I converted the Annotation Feature Class to a Point.

 

Then created a Polygon from the Annotation Feature Classes, pointing to

the Point Feature class for the Attributes (label field, degree field)

 

I then read the Polygons into GeoMoose and label on the field and Angle

the text by "Angle' Field.

 

The ANGLE call to Map Server dosent seem to work in this case

 

Any thoughts?

 

From: Jay Kapalczynski 

Sent: Tuesday, August 05, 2008 2:48 PM

To: 'mapserver-users at lists.osgeo.org'

Subject: Labeling

 

 

 

Don't know if I have to correct location.

 

 

 

I have been successful labeling street centerlines using the ANGLE

FOLLOW in the .map File

 

 

This is being performed on a Shapefile Line feature

 

 

 

I also have a Polygon Feature that has a field that I am trying to

label....once again I need the text to follow the polygon 

 

As you can see from the image the road names a following properly, but

the labels for the polygons are not following...

 

I tried the ANGLE FOLLOW on the Polygon and It will not draw..

 

I tried ANGLE [Angle] with Angle being a field name that holds Degree

values (ex 270) does the field have to be numeric?

 

 

 

 

 

Is there some other syntax that I have to put in the map file that will

force the text to follow the Polygon?

 

 

 

THANKS

 

 

 

 

 

 

 

 

 

STREET MAP FILE

 

 

 

LAYER # Maple Grove Streets Name

 

                    NAME Streets_Labels

 

                    DATA './GEOCODED_CENTERLINES2.shp'

 

                    STATUS DEFAULT

 

                    TYPE annotation

 

                    MAXSCALE 6000

 

                    MINSCALE 100

 

                    LABELITEM 'STREET_NAM'

 

 

 

                                LABELCACHE ON

 

                     CLASS

 

                       COLOR -1 -1 -1

 

                       LABEL

 

                                TYPE TRUETYPE

 

                                FONT vera_sans

 

                                ANGLE FOLLOW

 

                                POSITION AUTO

 

                                MAXSIZE 10

 

                                SIZE 8

 

                                MINSIZE 8

 

                                ANTIALIAS TRUE

 

                                COLOR 0 0 0

 

                                OUTLINECOLOR 255 255 192

 

                                BUFFER 2

 

                       END

 

                     END

 

  END # Maple Grove Streets Name

 

 

 

PARCELS MAP FILE THAT DOES NOT WORK

 

 

 

                LAYER # Maple Grove Parcels

 

                    NAME Parcel_Labels

 

                    DATA './parcels.shp'

 

                    STATUS DEFAULT

 

                    TYPE annotation

 

                    MAXSCALE 2500

 

                    MINSCALE 100

 

                    LABELITEM 'TextString'

 

 

 

                   ANGLE [Angle]

 

                   POSITION AUTO

 

                   PARTIALS FALSE

 

                                

 

                                LABELCACHE ON

 

                     CLASS

 

                       COLOR -1 -1 -1

 

                       LABEL

 

                                TYPE TRUETYPE

 

                                FONT vera_sans

 

                                MAXSIZE 8

 

                                SIZE 8

 

                                MINSIZE 2

 

                                #ANTIALIAS TRUE

 

                                COLOR 0 0 0

 

                                OUTLINECOLOR 255 255 128

 

                                BUFFER 2

 

                       END

 

                     END

 

  END # Maple Grove Parcels

 

 

 

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20080806/888899c1/attachment-0001.html


More information about the mapserver-users mailing list