you can use the "XY Layers", see
http://svn.pmapper.net/trac/wiki/DocManual#XYLayers
armin
Bagus Budhi wrote:
>
> I have already created this code to show point object on map server. That
> was succes to make image in temp folder but that image can't show on the
> browser. I want to add this code to pmapper but I still confuse where I must
> put this code.
>
> Can somebody help me...
>
> Thanks..
>
>
> <?php
> class drawpoint {
> private $host;
> private $user;
> private $pass;
> private $db;
> private $result;
> private $query;
> private $numrows;
> private $mapfile;
>
> function __construct($host,$user,$pass,$db){
> $this->host=$host;
> $this->user=$user;
> $this->pass=$pass;
> $this->db=$db;
> $dB =mysql_connect($this->host,$this->user,$this->pass);
> mysql_select_db($this->db);
> }
> function addPointDB ($mapfile){
> $this->mapfile=$mapfile;
> $this->query=("SELECT * FROM bts");
> $this->result =mysql_db_query($this->db,$this->query);
> $this->numrows = mysql_num_rows($this->result);
> if($this->numrows !=0){
> print "<table border='1' summary=''>";
> print " <tr><th>ID</th><th>X</th><th>Y</th></tr>";
> $map=ms_newMapObj($this->mapfile);
> $img = $map->draw();
> $layer = $map->getLayerByName('test');
> //print "work";
> for ($i = 0; $i < $this->numrows; $i++)
> {
> $value = mysql_fetch_array($this->result);
> $point = ms_newPointObj();
> $point->setXY($value[1],$value[2]);
> $point->draw($map, $layer, $img, 0 ,'map image');
> $url = $img->saveWebImage();
> $point->free();
> print
> "<tr><td>$value[0]</td><td>$value[1]</td><td>$value[2]</td></tr>";
> }
> $url = $img->saveWebImage();
> return $url;
> }
> }
>
> }
> $addpoint= new drawpoint("localhost","root","password","blabla");
> $url=$addpoint->addPointDB("test.map");
> echo "</table><img src='$url' border= '1' alt='map image'>";
>
> ?>
>
>
> ---------------------------------
> We won't tell. Get more on shows you hate to love
> (and love to hate): Yahoo! TV's Guilty Pleasures list.
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Show point from database
> From:
> Bagus Budhi <[EMAIL PROTECTED]>
> Date:
> Thu, 15 Mar 2007 01:56:28 -0700 (PDT)
> To:
> [email protected]
>
> To:
> [email protected]
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> pmapper-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/pmapper-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users