[Mapserver-users] How to Draw Annotation Layer Last
Ed McNierney
ed at topozone.com
Tue Jan 21 09:04:08 PST 2003
This is a multi-part message in MIME format.
------_=_NextPart_001_01C2C16F.1CDC39A3
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Dan -
=20
MapServer draws all layers in 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.
=20
- 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=20
-----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 =
am doing wrong. =20
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.
Thanks!
LAYER
NAME 'credits'
STATUS ON
TRANSFORM false
TYPE annotation
FEATURE
POINTS 5 10 END
TEXT '=A9 www.destinationdive.com <http://www.destinationdive.com/> ' =
=20
END
CLASS
LABEL
TYPE truetype
FONT verdana
SIZE 8
ANTIALIAS true
COLOR 0 0 0=20
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(tm)
dbarron at ddive.com
http:// <http://www.destinationdive.com/> =
<http://www.destinationdive.com/> www.destinationdive.com
(619) 275-5346
------_=_NextPart_001_01C2C16F.1CDC39A3
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D562240317-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2>Dan=20
-</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240317-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D562240317-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240317-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D562240317-21012003> <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>- Ed</FONT></SPAN></DIV>
<DIV><SPAN class=3D562240317-21012003>
<P><FONT size=3D2>Ed McNierney<BR>President and Chief =
Mapmaker<BR>TopoZone.com /=20
Maps a la carte, Inc.<BR>73 Princeton Street, Suite 305<BR>North =
Chelmsford,=20
MA 01863<BR>ed at topozone.com<BR>(978) 251-4242 =
</FONT></P></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
size=3D2>-----Original Message-----<BR><B>From:</B> Dan Barron=20
[mailto:dbarron at ddive.com]<BR><B>Sent:</B> Tuesday, January 21, 2003 =
11:49=20
AM<BR><B>To:</B> mapserver-users at lists.gis.umn.edu<BR><B>Subject:</B>=20
[Mapserver-users] How to Draw Annotation Layer=20
Last<BR><BR></FONT></DIV>Hello,<BR><BR>I have searched through the =
archives=20
w/o much luck on determining what I am doing wrong. <BR><BR>I am =
using=20
MapServer v3.5 and am trying to draw an annotation layer so it is =
always the=20
last layer to be drawn and shows on top of all other layers. =
Right now=20
it is always drawn under my other layers and is not seen. I also =
use=20
PHP/Mapscript to create the maps and have tried to force this layer to =
be=20
drawn last, w/o success. Can anyone clue me in on the method to =
ensure=20
this layer is always draw last, either via the map file only or via=20
php/mapscript? Below is the map file entry for the layer and the =
php/mapscript snippet.<BR><BR>Thanks!<BR><BR><BR>LAYER<BR> NAME=20
'credits'<BR> STATUS ON<BR> TRANSFORM false<BR> TYPE=20
annotation<BR> FEATURE<BR> POINTS 5 10 =
END<BR> =20
TEXT '=A9 <A href=3D"http://www.destinationdive.com/"=20
eudora=3D"autourl">www.destinationdive.com</A>' =20
<BR> END<BR> CLASS<BR> =
LABEL<BR> =20
TYPE truetype<BR> FONT=20
verdana<BR> SIZE 8<BR> =
ANTIALIAS true<BR> COLOR 0 0 0=20
<BR> POSITION UR<BR> =20
END<BR> END<BR>END<BR><BR><BR>// ~~~ DRAW Credits Layers=20
~~~<BR>$creditsLayer =3D $map->getLayerByName( 'credits'=20
);<BR>$creditsLayer->set( 'status', MS_ON =
);<BR>$creditsLayer->draw(=20
$image );<BR><BR>// ~~~ DRAW the PNG files for map, scalebar, and =
reference=20
map=20
=
~~~<BR>$image_url_PNG=3D$image->saveWebImage(MS_PNG,1,1,0);<BR><BR><BR=
><X-SIGSEP>
<P></X-SIGSEP><B>Dan Barron<BR></B>Principal / Founder<BR>Destination =
Software=20
LLC - developers of<B> Destination DIVE™<BR></B><FONT=20
color=3D#0000ff><U>dbarron at ddive.com<BR></U></FONT><A=20
href=3D"http://www.destinationdive.com/" =
eudora=3D"autourl">http://</A><A=20
href=3D"http://www.destinationdive.com/" eudora=3D"autourl"><FONT=20
color=3D#0000ff><U>www.destinationdive.com</A><BR></U></FONT>(619)=20
275-5346<BR></P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C2C16F.1CDC39A3--
More information about the MapServer-users
mailing list