[Mapserver-users] How to Draw Annotation Layer Last

Dan Barron dbarron at ddive.com
Tue Jan 21 11:48:40 EST 2003


--=====================_68347843==.ALT
Content-Type: text/plain; charset="iso-8859-1"; format=flowed
Content-Transfer-Encoding: quoted-printable

Hello,

I have searched through the archives w/o much luck on determining what I am=
=20
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=99
dbarron at ddive.com
http://www.destinationdive.com
(619) 275-5346

--=====================_68347843==.ALT
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<body>
Hello,<br><br>
I have searched through the archives w/o much luck on determining what I
am doing wrong.&nbsp; <br><br>
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.&nbsp; Right now it is always drawn under my other layers and is
not seen.&nbsp; I also use PHP/Mapscript to create the maps and have
tried to force this layer to be drawn last, w/o success.&nbsp; 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?&nbsp; Below is the map file
entry for the layer and the php/mapscript snippet.<br><br>
Thanks!<br><br>
<br>
LAYER<br>
&nbsp;NAME 'credits'<br>
&nbsp;STATUS ON<br>
&nbsp;TRANSFORM false<br>
&nbsp;TYPE annotation<br>
&nbsp;FEATURE<br>
&nbsp;&nbsp; POINTS 5 10 END<br>
&nbsp;&nbsp; TEXT '=A9
<a href=3D"http://www.destinationdive.com/" eudora=3D"autourl">www.destinati=
ondive.com</a>'&nbsp;
<br>
&nbsp;END<br>
&nbsp;CLASS<br>
&nbsp;&nbsp; LABEL<br>
&nbsp;&nbsp;&nbsp;&nbsp; TYPE truetype<br>
&nbsp;&nbsp;&nbsp;&nbsp; FONT verdana<br>
&nbsp;&nbsp;&nbsp;&nbsp; SIZE 8<br>
&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS true<br>
&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 0 <br>
&nbsp;&nbsp;&nbsp;&nbsp; POSITION UR<br>
&nbsp;&nbsp; END<br>
&nbsp;END<br>
END<br><br>
<br>
// ~~~ DRAW Credits Layers ~~~<br>
$creditsLayer =3D $map-&gt;getLayerByName( 'credits' );<br>
$creditsLayer-&gt;set( 'status', MS_ON );<br>
$creditsLayer-&gt;draw( $image );<br><br>
// ~~~ DRAW the PNG files for map, scalebar, and reference map ~~~<br>
$image_url_PNG=3D$image-&gt;saveWebImage(MS_PNG,1,1,0);<br><br>
<br>
<x-sigsep><p></x-sigsep>
<b>Dan Barron<br>
</b>Principal / Founder<br>
Destination Software LLC - developers of<b> Destination DIVE=99<br>
</b><font color=3D"#0000FF"><u>dbarron at ddive.com<br>
</u></font><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"><u>www.destinationdive.com</a><b=
r>
</u></font>(619) 275-5346<br>
</body>
</html>

--=====================_68347843==.ALT--




More information about the mapserver-users mailing list