[Mapserver-users] dynamic pointing problem

Murat Isik muratisik at megatek.com.tr
Fri Oct 31 08:29:23 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_002D_01C39FC3.C2C16840
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thank you. But that didnot work, I changed it to 'target1' and also =
tried it with 'test1' but it still didnot work :(

Can anybody take a look at the code and mapfile to see if anything else =
is wrong. It is urgent. Please.

Have a nice day.

Murat Isik

<HTML>
<HEAD>
<TITLE>Displaying a Point</TITLE>
</HEAD>


<CENTER>

<H1>DYNAMIC POINT</H1>
<P>
<?php
dl("php_mapscript.so");

$map =3D ms_newMapObj("demo_try.map");
$image=3D$map->draw();
$layer =3D $map->getLayerByName("point");
$layer->set('status', MS_ON);
$pt =3D ms_newPointObj();
$x =3D 29.1;
$y =3D 40.97;
$pt->setXY($x, $y);
$pt->draw($map,$layer,$image, 0, "DENEME");
$image_url=3D$image->saveWebImage();
$image_url=3D$image->saveWebImage(MS_GIF,1,1,90); // tried this line =
with=20
                                                                         =
         // $image_url=3D3D$image->saveWebImage(); too.


?>
<BODY>
<IMG SRC=3D3D<?php echo $image_url; ?> >
</BODY>
</HTML>


map file:

#
# Start of map file
#
NAME ERENKOY
STATUS ON
SIZE 600 600
EXTENT 29.057 40.954 29.143 40.999
UNITS DD
SHAPEPATH "data"
IMAGECOLOR 255 255 255


IMAGETYPE PNG


WEB
  MINSCALE 1000
  MAXSCALE 1550000
  IMAGEPATH "/var/www/html/mapserver/tmp3/"
  IMAGEURL "/mapserver/tmp3/"
END


SYMBOL
  NAME 'circle'
  TYPE ELLIPSE
  POINTS 1 1 END
  FILLED TRUE
END


LAYER
  NAME 'ERENKOY_ORNEKILCE_PG_region'
  TYPE polygon
  STATUS DEFAULT
  DATA ERENKOY_ORNEKILCE_PG_region

  CLASSITEM 'ID'
  CLASS
    EXPRESSION '3'
    OUTLINECOLOR 128 128 128
    COLOR 225 225 185
  END
  CLASS=3D20
    EXPRESSION /./
    OUTLINECOLOR 128 128 128
    COLOR 255 255 255
  END

END

LAYER
  NAME 'point'
  TYPE point
  STATUS ON
   CLASS
    SYMBOL 'circle'
    COLOR 255 0 0
    SIZE 20
     LABEL
      COLOR 0 0 0
     END
   END

END



END # end of map file



------=_NextPart_000_002D_01C39FC3.C2C16840
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3700.6699" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thank you. But that didnot work, I =
changed it to=20
'target1' and also tried it with 'test1' but it still didnot work=20
:(</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can anybody take a look at the code and =
mapfile to=20
see if anything else is wrong. It is urgent. Please.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Have a nice day.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Murat Isik</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>&lt;HTML&gt;<BR>&lt;HEAD&gt;<BR>&lt;TITLE&gt;Displaying a=20
Point&lt;/TITLE&gt;<BR>&lt;/HEAD&gt;<BR><BR><BR>&lt;CENTER&gt;<BR><BR>&lt=
;H1&gt;DYNAMIC=20
POINT&lt;/H1&gt;<BR>&lt;P&gt;<BR>&lt;?php<BR>dl("php_mapscript.so");<BR><=
BR>$map=20
=3D ms_newMapObj("demo_try.map");<BR>$image=3D$map-&gt;draw();<BR>$layer =
=3D=20
$map-&gt;getLayerByName("point");<BR>$layer-&gt;set('status', =
MS_ON);<BR>$pt =3D=20
ms_newPointObj();<BR>$x =3D 29.1;<BR>$y =3D 40.97;<BR>$pt-&gt;setXY($x,=20
$y);<BR>$pt-&gt;draw($map,$layer,$image, 0,=20
"DENEME");<BR>$image_url=3D$image-&gt;saveWebImage();<BR>$image_url=3D$im=
age-&gt;saveWebImage(MS_GIF,1,1,90);=20
// tried this line with&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //=20
$image_url=3D3D$image-&gt;saveWebImage();=20
too.<BR><BR><BR>?&gt;<BR>&lt;BODY&gt;<BR>&lt;IMG SRC=3D3D&lt;?php echo =
$image_url;=20
?&gt; &gt;<BR>&lt;/BODY&gt;<BR>&lt;/HTML&gt;<BR><BR><BR>map =
file:<BR><BR>#<BR>#=20
Start of map file<BR>#<BR>NAME ERENKOY<BR>STATUS ON<BR>SIZE 600 =
600<BR>EXTENT=20
29.057 40.954 29.143 40.999<BR>UNITS DD<BR>SHAPEPATH =
"data"<BR>IMAGECOLOR 255=20
255 255<BR><BR><BR>IMAGETYPE PNG<BR><BR><BR>WEB<BR>&nbsp; MINSCALE=20
1000<BR>&nbsp; MAXSCALE 1550000<BR>&nbsp; IMAGEPATH=20
"/var/www/html/mapserver/tmp3/"<BR>&nbsp; IMAGEURL=20
"/mapserver/tmp3/"<BR>END<BR><BR><BR>SYMBOL<BR>&nbsp; NAME =
'circle'<BR>&nbsp;=20
TYPE ELLIPSE<BR>&nbsp; POINTS 1 1 END<BR>&nbsp; FILLED=20
TRUE<BR>END<BR><BR><BR>LAYER<BR>&nbsp; NAME=20
'ERENKOY_ORNEKILCE_PG_region'<BR>&nbsp; TYPE polygon<BR>&nbsp; STATUS=20
DEFAULT<BR>&nbsp; DATA ERENKOY_ORNEKILCE_PG_region<BR><BR>&nbsp; =
CLASSITEM=20
'ID'<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; EXPRESSION =
'3'<BR>&nbsp;&nbsp;&nbsp;=20
OUTLINECOLOR 128 128 128<BR>&nbsp;&nbsp;&nbsp; COLOR 225 225 =
185<BR>&nbsp;=20
END<BR>&nbsp; CLASS=3D20<BR>&nbsp;&nbsp;&nbsp; EXPRESSION=20
/./<BR>&nbsp;&nbsp;&nbsp; OUTLINECOLOR 128 128 128<BR>&nbsp;&nbsp;&nbsp; =
COLOR=20
255 255 255<BR>&nbsp; END<BR><BR>END<BR><BR>LAYER<BR>&nbsp; NAME=20
'point'<BR>&nbsp; TYPE point<BR>&nbsp; STATUS ON<BR>&nbsp;&nbsp;=20
CLASS<BR>&nbsp;&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp;&nbsp; COLOR =
255 0=20
0<BR>&nbsp;&nbsp;&nbsp; SIZE 20<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 =
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;&nbsp; END<BR><BR>END<BR><BR><BR><BR>END # end of map=20
file<BR><BR></DIV></FONT></BODY></HTML>

------=_NextPart_000_002D_01C39FC3.C2C16840--




More information about the mapserver-users mailing list