[Mapserver-users] how to mark a point (text member of draw()-function)
Katarina Kobesova
katarina.kobesova at chello.at
Tue Jan 7 11:34:48 PST 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> </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> </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> NAME "home_point"<BR> =
TYPE=20
POINT<BR> STATUS OFF<BR> =20
CLASS<BR> NAME=20
"Ausgangspunkt"<BR> SYMBOL =
"s_home" =20
#in der symbol-datei<BR> 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> </DIV>
<DIV><FONT face=3D"Courier New" =
size=3D2>/*********** Layer and the=20
Point to draw ***************/<BR>$home_layer =3D=20
$map->getLayerByName("home_point");<BR>$home_layer->set("status",=20
1);<BR>$home1 =3D =
ms_newPointObj();<BR>$home1->setXY($_SESSION["s_fromx"],=20
$_SESSION["s_fromy"]);</FONT></DIV>
<DIV><FONT face=3D"Courier New" size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2><FONT face=3D"Courier =
New">if($_SESSION["s_tox"] !=3D 0=20
&& $_SESSION["s_toy"] !=3D 0) {<BR> $home2 =3D=20
ms_newPointObj();<BR> $home2->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->draw(); //my map-object<BR>//Home1 und eventuell =
Home2 dazu=20
zeichnen<BR>$home1->draw($map, $home_layer, $image, 0,=20
"blablabla");<BR>if(is_object($home2) && get_class($home2) =
=3D=3D "point")=20
{<BR> $home2->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> </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 need the text for marking of the starting point.<BR>Can this =
explain=20
anybody to me? </FONT></DIV>
<DIV><FONT face=3DArial></FONT> </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