Mark center of map?
Fawcett, David
David.Fawcett at STATE.MN.US
Tue Mar 15 14:51:17 PST 2005
Richard,
I am pretty sure that you want to place a FEATURE on your map.
Take a look at the documentation here: http://mapserver.gis.umn.edu/doc44/mapfile-reference.html#feature
The POINTS are in pixels, so based on the image size that you have specified, you can easily calculate the center pixel.
Instead of placing a label as done below, you want to draw an 'x' or cross. I don't have a symbol definition handy, but you should be able to find one in the list archives.
Here is a layer from a mapfile that I use to label the top of a map image:
LAYER
NAME "MapLabel"
TYPE ANNOTATION
STATUS DEFAULT
TRANSFORM FALSE
FEATURE
POINTS 55 10 END # Text in Upper-left
TEXT "Grandstand - Lower Level"
END
CLASS
LABEL
COLOR 0 0 0
#COLOR 255 255 255
#OUTLINECOLOR 0 0 0
TYPE TRUETYPE
FONT arial
SIZE 12
POSITION AUTO
FORCE TRUE
OFFSET 1 1
PARTIALS FALSE
END # Label
END # CLASS
END
-----Original Message-----
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU]On
Behalf Of Richard A. Milewski
Sent: Tuesday, March 15, 2005 4:37 PM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] Mark center of map?
Can someone point me at a how-to that describes how to draw on a map? What
I need to do is plant a big red X at the very center of a map served by
mapserver. The Symbology reference seems to be all about how to place
symbols at locations defined in a dbf file, but I need to plot this symbol
at the center of whatever extent the user has chosen. The maps are specified
by Lat/Lng, so I know the coordinates but not until they request is actually
sent to MapServer. Running MapServer 4.4.1 on Linux (but not Mapscript
...yet).
I can build a script that fetches the image and then places the symbol in
the center of the image with netpbm or image magick, but that seems crude,
and I suspect there is a way to do it inside mapserver, but I haven't found
it yet.
Thanks for the help!
-- Richard
More information about the MapServer-users
mailing list