[mapserver-users] RE: Labeling via OGR, MySQL table
Jay Kapalczynski
jkapalczynski at ci.maple-grove.mn.us
Thu Apr 16 12:10:59 PDT 2009
I was able to get some text to display with this:
ALTHOUGH I could only get the fields that were Numeric to label...cant get text fields to display.
Is this a syntax thing or is it not possible?
<OGRVRTDataSource>
<OGRVRTLayer name="Coordinatedata">
<SrcDataSource>MYSQL:coordinates_database,user=Jay,password=Letmein,host=127.0.0.1,port=3306,tables=coordinates</SrcDataSource>
<SrcSQL>SELECT X,Y,ID FROM coordinates</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="PointFromColumns" x="X" y="Y"/>
</OGRVRTLayer>
</OGRVRTDataSource>
LAYER # Points from the MySQL Database
NAME Database
STATUS DEFAULT
TYPE ANNOTATION
CONNECTIONTYPE OGR
CONNECTION './Coordinatedata1.ovf'
DATA 'Coordinatedata'
LABELITEM 'ID'
LABELCACHE ON
CLASS
LABEL
POSITION CC
FONT vera_sans
TYPE TRUETYPE
COLOR 0 0 0
OUTLINECOLOR 255 255 128
SIZE 7
END
END
END
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Jay Kapalczynski
Sent: Thursday, April 16, 2009 1:29 PM
To: 'mapserver-users at lists.osgeo.org'
Subject: [mapserver-users] RE: Labeling via OGR, MySQL table
This is my ovf file: Name is the field I want to label on...
Anyone have any thoughts?
<OGRVRTDataSource>
<OGRVRTLayer name="Coordinatedata">
<SrcDataSource>MYSQL:coordinates_database,user=Jay,password=Passw0rd,host=127.0.0.1,port=3306,tables=coordinates</SrcDataSource>
<SrcSQL>SELECT X,Y,Name FROM coordinates</SrcSQL>
<GeometryType>wkbPoint</GeometryType>
<GeometryField encoding="PointFromColumns" x="X" y="Y"/>
</OGRVRTLayer>
</OGRVRTDataSource>
From: Jay Kapalczynski
Sent: Thursday, April 16, 2009 12:02 PM
To: mapserver-users at lists.osgeo.org
Subject: Labeling via OGR, MySQL table
I am plotting a few points via an OVF file and MySQL table
The points show up fine...
As soon as I try to label from the MySQL table the Star points disappear...
I imagine I have some syntax issues or missing something in the map file (See below)
Any thoughts?
THANKS
HERE ARE THE POINTS
LAYER # Points from the MySQL Database
NAME Database
STATUS DEFAULT
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION './Coordinatedata1.ovf'
DATA 'Coordinatedata'
CLASS
#NAME "ID"
STYLE
SYMBOL "star"
SIZE 15
COLOR 238 0 0
END
END
END
CANT GET THE LABELS TO SHOW UP
LAYER # Points from the MySQL Database
NAME Database
STATUS DEFAULT
TYPE POINT
CONNECTIONTYPE OGR
CONNECTION './Coordinatedata1.ovf'
DATA 'Coordinatedata'
LABELITEM 'Name'
LABELCACHE ON
CLASS
LABEL
COLOR 0 0 0
SIZE 7
END
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090416/c760f664/attachment.htm>
More information about the MapServer-users
mailing list