[Mapserver-users] How to Draw Annotation Layer Last
Dan Barron
dbarron at ddive.com
Tue Jan 21 10:22:31 PST 2003
--=====================_923578==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable
Ed,
Thanks for the reply. I have and had tried moving the layer definition to=
=20
the beginning and the end of the map file with the same results. I had=20
figured it to be more php/mapscript related issue, though when I draw the=20
layer last in php/mapscript I also have the same result - the annotation=20
layer is drawn under the other layers. Any other ideas?
Thanks,
Dan
At 12:04 PM 1/21/2003 -0500, Ed McNierney wrote:
>Dan -
>
>MapServer draws all layers in order in the mapfile from bottom to top -=20
>that is, each layer in turn is drawn on top of all preceding layers. Put=
=20
>your annotation layer as the last layer in the file.
>
> - Ed
>
>Ed McNierney
>President and Chief Mapmaker
>TopoZone.com / Maps a la carte, Inc.
>73 Princeton Street, Suite 305
>North Chelmsford, MA 01863
>ed at topozone.com
>(978) 251-4242
>-----Original Message-----
>From: Dan Barron [mailto:dbarron at ddive.com]
>Sent: Tuesday, January 21, 2003 11:49 AM
>To: mapserver-users at lists.gis.umn.edu
>Subject: [Mapserver-users] How to Draw Annotation Layer Last
>
>Hello,
>
>I have searched through the archives w/o much luck on determining what I=20
>am doing wrong.
>
>I am using MapServer v3.5 and am trying to draw an annotation layer so it=
=20
>is always the last layer to be drawn and shows on top of all other=20
>layers. Right now it is always drawn under my other layers and is not=20
>seen. I also use PHP/Mapscript to create the maps and have tried to force=
=20
>this layer to be drawn last, w/o success. Can anyone clue me in on the=20
>method to ensure this layer is always draw last, either via the map file=20
>only or via php/mapscript? Below is the map file entry for the layer and=
=20
>the php/mapscript snippet.
>
>Thanks!
>
>
>LAYER
> NAME 'credits'
> STATUS ON
> TRANSFORM false
> TYPE annotation
> FEATURE
> POINTS 5 10 END
> TEXT '=A9 www.destinationdive.com'
> END
> CLASS
> LABEL
> TYPE truetype
> FONT verdana
> SIZE 8
> ANTIALIAS true
> COLOR 0 0 0
> POSITION UR
> END
> END
>END
>
>
>// ~~~ DRAW Credits Layers ~~~
>$creditsLayer =3D $map->getLayerByName( 'credits' );
>$creditsLayer->set( 'status', MS_ON );
>$creditsLayer->draw( $image );
>
>// ~~~ DRAW the PNG files for map, scalebar, and reference map ~~~
>$image_url_PNG=3D$image->saveWebImage(MS_PNG,1,1,0);
>
>
>Dan Barron
>Principal / Founder
>Destination Software LLC - developers of Destination DIVE"
>dbarron at ddive.com
>http://www.destinationdive.com
>(619) 275-5346
--=====================_923578==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html>
<body>
Ed,<br><br>
Thanks for the reply. I have and had tried moving the layer
definition to the beginning and the end of the map file with the same
results. I had figured it to be more php/mapscript related issue,
though when I draw the layer last in php/mapscript I also have the same
result - the annotation layer is drawn under the other layers. Any
other ideas?<br><br>
Thanks,<br><br>
Dan<br><br>
At 12:04 PM 1/21/2003 -0500, Ed McNierney wrote:<br>
<blockquote type=3Dcite class=3Dcite cite><font face=3D"arial" size=3D2 colo=
r=3D"#0000FF">Dan
-</font><br>
<br>
<font face=3D"arial" size=3D2 color=3D"#0000FF">MapServer draws all layers i=
n
order in the mapfile from bottom to top - that is, each layer in turn is
drawn on top of all preceding layers. Put your annotation layer as
the last layer in the file.</font><br>
<br>
<font face=3D"arial" size=3D2 color=3D"#0000FF">-
Ed</font><br><br>
<font size=3D2>Ed McNierney<br>
President and Chief Mapmaker<br>
TopoZone.com / Maps a la carte, Inc.<br>
73 Princeton Street, Suite 305<br>
North Chelmsford, MA 01863<br>
ed at topozone.com<br>
(978) 251-4242 <br>
</font>
<dl>
<dd><font face=3D"tahoma" size=3D2>-----Original Message-----<br>
<dd>From:</b> Dan Barron
[<a href=3D"mailto:dbarron at ddive.com"=
eudora=3D"autourl">mailto:dbarron at ddive.com</a>]<br>
<dd>Sent:</b> Tuesday, January 21, 2003 11:49 AM<br>
<dd>To:</b> mapserver-users at lists.gis.umn.edu<br>
<dd>Subject:</b> [Mapserver-users] How to Draw Annotation Layer
Last<br><br>
</font>
<dd>Hello,<br><br>
<dd>I have searched through the archives w/o much luck on determining
what I am doing wrong. <br><br>
<dd>I am using MapServer v3.5 and am trying to draw an annotation layer
so it is always the last layer to be drawn and shows on top of all other
layers. Right now it is always drawn under my other layers and is
not seen. I also use PHP/Mapscript to create the maps and have
tried to force this layer to be drawn last, w/o success. Can anyone
clue me in on the method to ensure this layer is always draw last, either
via the map file only or via php/mapscript? Below is the map file
entry for the layer and the php/mapscript snippet.<br><br>
<dd>Thanks!<br><br>
<br>
<dd>LAYER<br>
<dd> NAME 'credits'<br>
<dd> STATUS ON<br>
<dd> TRANSFORM false<br>
<dd> TYPE annotation<br>
<dd> FEATURE<br>
<dd> POINTS 5 10 END<br>
<dd> TEXT '=A9
<a href=3D"http://www.destinationdive.com'=A0/" eudora=3D"autourl">www.desti=
nationdive.com'
</a> <br>
<dd> END<br>
<dd> CLASS<br>
<dd> LABEL<br>
<dd> TYPE truetype<br>
<dd> FONT verdana<br>
<dd> SIZE 8<br>
<dd> ANTIALIAS true<br>
<dd> COLOR 0 0 0 <br>
<dd> POSITION UR<br>
<dd> END<br>
<dd> END<br>
<dd>END<br><br>
<br>
<dd>// ~~~ DRAW Credits Layers ~~~<br>
<dd>$creditsLayer =3D $map->getLayerByName( 'credits' );<br>
<dd>$creditsLayer->set( 'status', MS_ON );<br>
<dd>$creditsLayer->draw( $image );<br><br>
<dd>// ~~~ DRAW the PNG files for map, scalebar, and reference map
~~~<br>
<dd>$image_url_PNG=3D$image->saveWebImage(MS_PNG,1,1,0);<br><br>
<br>
<dd>Dan Barron<br>
</b>
<dd>Principal / Founder<br>
<dd>Destination Software LLC - developers of Destination DIVE"<br>
</b>
<dd><font color=3D"#0000FF">dbarron at ddive.com<br>
</u></font>
<dd><a href=3D"http://www.destinationdive.com/"=
eudora=3D"autourl">http://</a><a href=3D"http://www.destinationdive.com/"=
eudora=3D"autourl"><font color=3D"#0000FF">www.destinationdive.com</a><br>
</u></font>
<dd>(619) 275-5346<br>
</dl></blockquote></body>
</html>
--=====================_923578==.ALT--
More information about the MapServer-users
mailing list