[Mapserver-users] how to mark a point (text member of draw()-function)

Katarina Kobesova katarina.kobesova at chello.at
Tue Jan 7 14:34:48 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0016_01C2B68C.38CB27F0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi !

I have some problems with the drawing of a single point (or two points). =
I have a layer without DATA information in the mapfile.

mapfile
####### home layer #########
LAYER
   NAME "home_point"
   TYPE POINT
   STATUS OFF
   CLASS
      NAME "Ausgangspunkt"
      SYMBOL "s_home"   #in der symbol-datei
   END
END
####### home layer #########

phpfile:

/*********** Layer and the Point to draw ***************/
$home_layer =3D $map->getLayerByName("home_point");
$home_layer->set("status", 1);
$home1 =3D ms_newPointObj();
$home1->setXY($_SESSION["s_fromx"], $_SESSION["s_fromy"]);

if($_SESSION["s_tox"] !=3D 0 && $_SESSION["s_toy"] !=3D 0) {
   $home2 =3D ms_newPointObj();
   $home2->setXY($_SESSION["s_tox"], $_SESSION["s_toy"]);
}

$image =3D $map->draw();   //my map-object
//Home1 und eventuell Home2 dazu zeichnen
$home1->draw($map, $home_layer, $image, 0, "blablabla");
if(is_object($home2) && get_class($home2) =3D=3D "point") {
   $home2->draw($map, $home_layer, $image, 0, "blablabla");
}

Problem:
only the symbol is drawn, not the text. However, I need the text for =
marking of the starting point.
Can this explain anybody to me?=20

Many thanks
Kati
------=_NextPart_000_0016_01C2B68C.38CB27F0
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1126" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi !</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have some problems with the drawing =
of a single=20
point (or two points). I have a layer without DATA information in the=20
mapfile.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>mapfile</STRONG></FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2>####### home layer=20
#########<BR>LAYER<BR>&nbsp;&nbsp; NAME "home_point"<BR>&nbsp;&nbsp; =
TYPE=20
POINT<BR>&nbsp;&nbsp; STATUS OFF<BR>&nbsp;&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME=20
"Ausgangspunkt"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL =
"s_home"&nbsp;&nbsp;=20
#in der symbol-datei<BR>&nbsp;&nbsp; END<BR>END<BR>####### home layer=20
#########<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG>phpfile:</STRONG></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><STRONG></STRONG></FONT>&nbsp;</DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>/***********&nbsp;Layer&nbsp;and the=20
Point&nbsp;to draw&nbsp;***************/<BR>$home_layer =3D=20
$map-&gt;getLayerByName("home_point");<BR>$home_layer-&gt;set("status",=20
1);<BR>$home1 =3D =
ms_newPointObj();<BR>$home1-&gt;setXY($_SESSION["s_fromx"],=20
$_SESSION["s_fromy"]);</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier =
New">if($_SESSION["s_tox"] !=3D 0=20
&amp;&amp; $_SESSION["s_toy"] !=3D 0) {<BR>&nbsp;&nbsp; $home2 =3D=20
ms_newPointObj();<BR>&nbsp;&nbsp; $home2-&gt;setXY($_SESSION["s_tox"],=20
$_SESSION["s_toy"]);<BR>}<BR></FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New">$image =3D=20
$map-&gt;draw();&nbsp;&nbsp; //my map-object<BR>//Home1 und eventuell =
Home2 dazu=20
zeichnen<BR>$home1-&gt;draw($map, $home_layer, $image, 0,=20
"blablabla");<BR>if(is_object($home2) &amp;&amp; get_class($home2) =
=3D=3D "point")=20
{<BR>&nbsp;&nbsp; $home2-&gt;draw($map, $home_layer, $image, 0,=20
"blablabla");<BR>}</FONT></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier =
New"></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier New"><FONT=20
face=3DArial><STRONG><EM>Problem:</EM></STRONG></FONT></FONT></FONT></DIV=
><FONT=20
face=3DArial size=3D2><FONT face=3D"Courier New">
<DIV><FONT face=3DArial>only the symbol is drawn, not the text. However, =

I&nbsp;need the text&nbsp;for marking of the starting point.<BR>Can this =
explain=20
anybody to me? </FONT></DIV>
<DIV><FONT face=3DArial></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial>Many thanks</FONT></DIV>
<DIV><FONT face=3DArial>Kati</FONT></DIV></FONT></FONT></BODY></HTML>

------=_NextPart_000_0016_01C2B68C.38CB27F0--




More information about the mapserver-users mailing list