[Mapserver-users] How to Draw Annotation Layer Last

Ed McNierney ed at topozone.com
Tue Jan 21 13:29:41 EST 2003


This is a multi-part message in MIME format.

------_=_NextPart_001_01C2C17B.1052EC5D
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Dan -
=20
That seems very odd.  Can you try making the layer TYPE POINT and see if =
that changes anything (just a stab in the dark)?=20
=20
    - Ed

-----Original Message-----
From: Dan Barron [mailto:dbarron at ddive.com]
Sent: Tuesday, January 21, 2003 1:23 PM
To: Ed McNierney; mapserver-users at lists.gis.umn.edu
Subject: RE: [Mapserver-users] How to Draw Annotation Layer Last


Ed,

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?

Thanks,

Dan

At 12:04 PM 1/21/2003 -0500, Ed McNierney wrote:


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"


dbarron at ddive.com


http:// <http://www.destinationdive.com/>   =
<http://www.destinationdive.com/> www.destinationdive.com


(619) 275-5346



------_=_NextPart_001_01C2C17B.1052EC5D
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=3D460182618-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2>Dan=20
-</FONT></SPAN></DIV>
<DIV><SPAN class=3D460182618-21012003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D460182618-21012003><FONT face=3DArial color=3D#0000ff =
size=3D2>That=20
seems very odd.&nbsp; Can you try making the layer TYPE POINT and see if =
that=20
changes anything (just a stab in the dark)?&nbsp;</FONT></SPAN></DIV>
<DIV><SPAN class=3D460182618-21012003><FONT face=3DArial color=3D#0000ff =

size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D460182618-21012003>&nbsp;&nbsp;&nbsp; <FONT =
face=3DArial=20
color=3D#0000ff size=3D2>- Ed</FONT></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 =
1:23=20
  PM<BR><B>To:</B> Ed McNierney;=20
  mapserver-users at lists.gis.umn.edu<BR><B>Subject:</B> RE: =
[Mapserver-users] How=20
  to Draw Annotation Layer Last<BR><BR></FONT></DIV>Ed,<BR><BR>Thanks =
for the=20
  reply.&nbsp; I have and had tried moving the layer definition to the =
beginning=20
  and the end of the map file with the same results.&nbsp; I had figured =
it to=20
  be more php/mapscript related issue, though when I draw the layer last =
in=20
  php/mapscript I also have the same result - the annotation layer is =
drawn=20
  under the other layers.&nbsp; Any other=20
  ideas?<BR><BR>Thanks,<BR><BR>Dan<BR><BR>At 12:04 PM 1/21/2003 -0500, =
Ed=20
  McNierney wrote:<BR>
  <BLOCKQUOTE class=3Dcite cite=3D"" type=3D"cite"><FONT face=3Darial =
color=3D#0000ff=20
    size=3D2>Dan -</FONT><BR>&nbsp;<BR><FONT face=3Darial =
color=3D#0000ff=20
    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.&nbsp;=20
    Put your annotation layer as the last layer in the=20
    file.</FONT><BR>&nbsp;<BR>&nbsp;&nbsp;&nbsp; <FONT face=3Darial =
color=3D#0000ff=20
    size=3D2>- Ed</FONT><BR><BR><FONT size=3D2>Ed McNierney<BR>President =
and Chief=20
    Mapmaker<BR>TopoZone.com / Maps a la carte, Inc.<BR>73 Princeton =
Street,=20
    Suite 305<BR>North Chelmsford, MA&nbsp; =
01863<BR>ed at topozone.com<BR>(978)=20
    251-4242 <BR></FONT>
    <DL>
      <DD><FONT face=3Dtahoma size=3D2>-----Original Message-----<BR>
      <DD>From:</B> Dan Barron [<A href=3D"mailto:dbarron at ddive.com"=20
      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=20
      Last<BR><BR></FONT>
      <DD>Hello,<BR><BR>
      <DD>I have searched through the archives w/o much luck on =
determining what=20
      I am doing wrong.&nbsp; <BR><BR>
      <DD>I am using MapServer v3.5 and am trying to draw an annotation =
layer so=20
      it is always the last layer to be drawn and shows on top of all =
other=20
      layers.&nbsp; Right now it is always drawn under my other layers =
and is=20
      not seen.&nbsp; I also use PHP/Mapscript to create the maps and =
have tried=20
      to force this layer to be drawn last, w/o success.&nbsp; Can =
anyone clue=20
      me in on the method to ensure this layer is always draw last, =
either via=20
      the map file only or via php/mapscript?&nbsp; Below is the map =
file entry=20
      for the layer and the php/mapscript snippet.<BR><BR>
      <DD>Thanks!<BR><BR><BR>
      <DD>LAYER<BR>
      <DD>&nbsp;NAME 'credits'<BR>
      <DD>&nbsp;STATUS ON<BR>
      <DD>&nbsp;TRANSFORM false<BR>
      <DD>&nbsp;TYPE annotation<BR>
      <DD>&nbsp;FEATURE<BR>
      <DD>&nbsp;&nbsp; POINTS 5 10 END<BR>
      <DD>&nbsp;&nbsp; TEXT '=A9 <A =
href=3D"http://www.destinationdive.com'&nbsp;/"=20
      eudora=3D"autourl">www.destinationdive.com' </A><BR>
      <DD>&nbsp;END<BR>
      <DD>&nbsp;CLASS<BR>
      <DD>&nbsp;&nbsp; LABEL<BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; TYPE truetype<BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; FONT verdana<BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; SIZE 8<BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS true<BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 0 <BR>
      <DD>&nbsp;&nbsp;&nbsp;&nbsp; POSITION UR<BR>
      <DD>&nbsp;&nbsp; END<BR>
      <DD>&nbsp;END<BR>
      <DD>END<BR><BR><BR>
      <DD>// ~~~ DRAW Credits Layers ~~~<BR>
      <DD>$creditsLayer =3D $map-&gt;getLayerByName( 'credits' );<BR>
      <DD>$creditsLayer-&gt;set( 'status', MS_ON );<BR>
      <DD>$creditsLayer-&gt;draw( $image );<BR><BR>
      <DD>// ~~~ DRAW the PNG files for map, scalebar, and reference map =
~~~<BR>
      =
<DD>$image_url_PNG=3D$image-&gt;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/"=20
      eudora=3D"autourl">http://</A><A =
href=3D"http://www.destinationdive.com/"=20
      eudora=3D"autourl"><FONT=20
      color=3D#0000ff>www.destinationdive.com</A><BR></U></FONT>
      <DD>(619) =
275-5346<BR></DD></DL></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C2C17B.1052EC5D--



More information about the mapserver-users mailing list