Mark center of map?
Richard A. Milewski
ram at RAMPAGE.NET
Thu Mar 17 18:02:56 PST 2005
Ryan, Adam wrote:
>>-----Original Message-----
>>From: Richard A. Milewski [mailto:ram at RAMPAGE.NET]
>>Sent: Thursday, March 17, 2005 3:43 PM
>>To: MAPSERVER-USERS at LISTS.UMN.EDU
>>Subject: Re: [UMN_MAPSERVER-USERS] Mark center of map?
>>
>>
>>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
>>
>>
>>
>
>Richard,
>
>Try leaving the feature object out of your mappin layer in the map file and
>add it to your cgi request instead. That way you can set both the size of
>the map and the position of the icon.
>
>...mapserv.exe?map=yourMap.map&mapsize=300 300&map_MapPin_feature_points=150
>150&...
>
>Cheers,
>
>Adam
>
>
Adam,
Thanks for the help. That worked. However it created another
conundrum. ...but being a bear of very little brain, I'm easily befuddled.
Specifying the Feature/Points clause in the url ONLY works if I remove
it from the layer specification in the .map file. So the question is
how do I know which parameters I can specify in BOTH places (such as the
extent, where the spec in the url overrides the one in the .map file),
and the ones like the Feature/Points spec where it can only be in one place?
-- Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20050317/da8985bf/attachment.htm>
More information about the MapServer-users
mailing list