[Mapserver-users] dynamic pointing problem

Murat Isik muratisik at megatek.com.tr
Fri Oct 31 05:29:23 PST 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> </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> </DIV>
<DIV><FONT face=3DArial size=3D2>Have a nice day.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>Murat Isik</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial=20
size=3D2><HTML><BR><HEAD><BR><TITLE>Displaying a=20
Point</TITLE><BR></HEAD><BR><BR><BR><CENTER><BR><BR>&lt=
;H1>DYNAMIC=20
POINT</H1><BR><P><BR><?php<BR>dl("php_mapscript.so");<BR><=
BR>$map=20
=3D ms_newMapObj("demo_try.map");<BR>$image=3D$map->draw();<BR>$layer =
=3D=20
$map->getLayerByName("point");<BR>$layer->set('status', =
MS_ON);<BR>$pt =3D=20
ms_newPointObj();<BR>$x =3D 29.1;<BR>$y =3D 40.97;<BR>$pt->setXY($x,=20
$y);<BR>$pt->draw($map,$layer,$image, 0,=20
"DENEME");<BR>$image_url=3D$image->saveWebImage();<BR>$image_url=3D$im=
age->saveWebImage(MS_GIF,1,1,90);=20
// tried this line with </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>       =20
            =
   =20
            =
   =20
            =
   =20
            =
   =20
          //=20
$image_url=3D3D$image->saveWebImage();=20
too.<BR><BR><BR>?><BR><BODY><BR><IMG SRC=3D3D<?php echo =
$image_url;=20
?> ><BR></BODY><BR></HTML><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>  MINSCALE=20
1000<BR>  MAXSCALE 1550000<BR>  IMAGEPATH=20
"/var/www/html/mapserver/tmp3/"<BR>  IMAGEURL=20
"/mapserver/tmp3/"<BR>END<BR><BR><BR>SYMBOL<BR>  NAME =
'circle'<BR> =20
TYPE ELLIPSE<BR>  POINTS 1 1 END<BR>  FILLED=20
TRUE<BR>END<BR><BR><BR>LAYER<BR>  NAME=20
'ERENKOY_ORNEKILCE_PG_region'<BR>  TYPE polygon<BR>  STATUS=20
DEFAULT<BR>  DATA ERENKOY_ORNEKILCE_PG_region<BR><BR>  =
CLASSITEM=20
'ID'<BR>  CLASS<BR>    EXPRESSION =
'3'<BR>   =20
OUTLINECOLOR 128 128 128<BR>    COLOR 225 225 =
185<BR> =20
END<BR>  CLASS=3D20<BR>    EXPRESSION=20
/./<BR>    OUTLINECOLOR 128 128 128<BR>    =
COLOR=20
255 255 255<BR>  END<BR><BR>END<BR><BR>LAYER<BR>  NAME=20
'point'<BR>  TYPE point<BR>  STATUS ON<BR>  =20
CLASS<BR>    SYMBOL 'circle'<BR>    COLOR =
255 0=20
0<BR>    SIZE 20<BR>    =20
LABEL<BR>      COLOR 0 0 =
0<BR>    =20
END<BR>   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