[Mapserver-users] Getting Position of the Label text as MS will place it
PATTERSON KENNETH ALLEN
kapatter at srpnet.com
Thu Apr 29 11:11:39 PDT 2004
In our app we create a HTML map used to position popup information when the cursor is positions at a specific place on the image. The user can hover the cursor over a point and information will display. We use Perl to program the site.
It would be very useful for us if we can query the position that MS draws the labels at. Use the following layer definition as the example: How can we get each bounding box of the text label that is drawn (i.e. TEXT "Col_label_nm")?
We are able to get the shape index from the query result set etc.. I'm guessing that since we can't find anything exposed we will need to do the same calculations that MS is doing to get the text bounding box. Is this going to get way to tricky? Should we find another UI solution? Anybody done this before? Suggestions?
Thanks,
Ken
LAYER
NAME "Stuff"
GROUP Geographical
TYPE POLYGON
STATUS on
template "dummy"
DATA "/.../stuff.shp"
CLASS
NAME 'aclass'
OUTLINECOLOR 200 200 200
TEXT ([Col_label_nm])
LABEL
TYPE TRUETYPE
FONT helmetBI
antialias off
COLOR 255 0 0
MINSIZE 10
MAXSIZE 14
POSITION AUTO
PARTIALS FALSE
END # Label
END # Class
END # Stuff Layer
More information about the MapServer-users
mailing list