Mark center of map?
Richard A. Milewski
ram at RAMPAGE.NET
Thu Mar 17 15:42:58 PST 2005
Jeff,
I tried your suggestion and got it to work, but I noticed some odd things
and I just want to be sure I really understand what I'm doing.
Here's the layer that works for me:
LAYER
NAME MapPin
STATUS ON
TYPE Point
TRANSFORM FALSE
FEATURE
POINTS
150 150
END
END
CLASS
SYMBOL "Symbols/Airport01.gif"
OUTLINECOLOR 255 255 255
END
END
The unexpected things I found were:
1 - I seem to need either a COLOR or OUTLINECOLOR statement in the CLASS
clause. It doesn't matter what color I specify or whether I use COLOR or
OUTLINECOLOR, but without one of the two, the symbol doesn't appear. The
specified color has no effect on the displayed color of the .gif however.
2 - The path to the marker specified in the SYMBOL statement is a path
relative to the .map file directory. There is a SHAPEPATH statement in the
MAP object definition, but that has no apparant effect here.
3 - It appears that the symbol is centered on the point defined in the
FEATURE clause. This is really cool and makes things much easier, but came
as a surprise. I was prepared to calculate my own centering a la netpbm and
image magick. This is much easier.
I now need to figure out how to change the POINT location on the fly because
I don't know what the actual map size is until the maprequest comes in from
the user. (These maps are being served to phones and different phones have
different size screens). The note at the end of the MapServer CGI Reference
seems to have enough information about how to do that though. I'll give it
a try.
I suspect you already know everything I've mentioned here, but I wanted to
make sure it got into the thread in the MapServer-Users list archive. I've
learned at least half of what I know about MapServer from the list, and want
to leave as much information around for the next guy as I can.
Many thanks for all the help!
-- Richard
More information about the MapServer-users
mailing list