Dynamic point
bino_oetomo
bino at INDOAKSES-ONLINE.COM
Tue Jun 14 21:06:25 PDT 2005
----- Original Message -----
From: "Jessica Deegan" <jessica.deegan at STATE.MN.US>
To: <MAPSERVER-USERS at LISTS.UMN.EDU>
Sent: Monday, June 13, 2005 11:33 PM
Subject: [UMN_MAPSERVER-USERS] displaying xy coordinates from database
> As a test, I was successful in adding a dynamic point where a user clicks
on
> the map using the sample found at
> http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint , but
I'm
> at a loss to where to begin this process from a database perspective. My
> data are stored in a PostgreSQL database.
>
While I got success in adding point from database, i got failed in adding
dynamic point .
The graph is 600x600 pixel
I want to add a single point in x=300 and y=300
Here is my phpmapscript
<?php
dl('php_mapscript_44.dll') ;
$oMap= ms_newMapObj('/ms4w/proj/bino/map1.map');
$oMap->setExtent(110.366, -7.79127, 110.376, -7.78127);
#create the point
$pt=ms_newPointObj();
$pt->setXY(300,300);
#Draw Map and Add point
$img=$oMap->draw();
$layer = $oMap->getLayerByName('INLINE');
$pt->draw($oMap, $layer, $img, "AA", 'yuuhuu');
$image_url=$img->saveWebImage();
?>
<html><body>
<image src= "<?php echo $image_url ?>"> </image>
</body></html>
And Here is my layer definition
LAYER
NAME "INLINE"
TYPE POINT
STATUS DEFAULT
CLASS
NAME "AA"
SYMBOL 1
SIZE 4
COLOR 0 255 255
LABEL
COLOR 255 0 0
SIZE LARGE
ANTIALIAS TRUE
POSITION UC
END
END #class
END #layer
Please give me a fix-clue
Regards
-bino-
More information about the MapServer-users
mailing list