<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<br>
<br>
Ryan, Adam wrote:
<blockquote cite="mid8292E3D1E5E2EF4A94C36FE80D2443A83A8235@linnms,"
 type="cite">
  <blockquote type="cite">
    <pre wrap="">-----Original Message-----
From: Richard A. Milewski [<a class="moz-txt-link-freetext" href="mailto:ram@RAMPAGE.NET">mailto:ram@RAMPAGE.NET</a>]
Sent: Thursday, March 17, 2005 3:43 PM
To: <a class="moz-txt-link-abbreviated" href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a>
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

    </pre>
  </blockquote>
  <pre wrap=""><!---->
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&amp;mapsize=300 300&amp;map_MapPin_feature_points=150
150&amp;...

Cheers,

Adam
  </pre>
</blockquote>
<br>
Adam,<br>
<br>
Thanks for the help.&nbsp; That worked.&nbsp; However it created another
conundrum.&nbsp; ...but being a bear of very little brain, I'm easily
befuddled. <br>
<br>
Specifying the Feature/Points clause in the url&nbsp; ONLY works if I remove
it from the layer specification in the .map file.&nbsp;&nbsp;&nbsp; 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?<br>
<br>
-- Richard<br>
<br>
<br>
</body>
</html>