Dynamic point

bino_oetomo bino at INDOAKSES-ONLINE.COM
Fri Jun 17 20:30:40 EDT 2005


Hi Fernando,
Thankyou for your enlightment ..

For other newbies as I'm : Here is another trick on adding dynamic point
object.

Regrads
-bino-
----- Original Message -----
From: "Fernando Simon" <fsimon at univali.br>
To: "bino_oetomo" <bino at indoakses-online.com>
Sent: Friday, June 17, 2005 6:17 PM
Subject: Re: [UMN_MAPSERVER-USERS] Dynamic point


> Hi,
>     I never used this way, here I used the shapeObj and the label work
> correctly.
>     Using the code from code you need to change this:
> ...
>     $map= ms_newMapObj('data/test2.map');
>     //Convert pixels to map units
>     $map_pt = click2map($_GET['image_x'],$_GET['image_y'],$map->extent);
>
>     //Create the point  - NEW CODE
>     $ShapePoint = ms_newShapeObj( MS_SHAPE_POINT );
>     $Line = ms_newLineObj();
>     $Line->addXY($map_pt[0],$map_pt[1]);
>     $ShapePoint ->add( $Line );
>     $ShapePoint->set("text", "YOUR TEXT FOR LABEL");
>     $layer = $map->getLayerByName('INLINE');
>     $layer ->addFeature( $ShapePoint );
>
>     //Draw the map and add the point
>     $img = $map->draw();
>     $url = $img->saveWebImage();
> ...
>
>     I believe that is the code that you can use to add the label for
> your points. If you wants that every point contains your own label you
> need to create a shape and add it in the layer for every point that you
> create.
>    Thanks.
>
> Fernando Simon
>
> bino_oetomo wrote:
>
> >Hi Fernando
> >----- Original Message -----
> >From: "Fernando Simon" <fsimon at univali.br>
> >To: "bino_oetomo" <bino at INDOAKSES-ONLINE.COM>
> >Sent: Friday, June 17, 2005 12:34 AM
> >Subject: Re: [UMN_MAPSERVER-USERS] Dynamic point
> >
> >
> >
> >
> >>Hi,
> >>    How did you defined you dynamic point?
> >>    If you defined each point with a shabeObj, you can use the parameter
> >>"TEXT" in shapeObj as the source for the label.
> >>    Thanks.
> >>
> >>
> >>
> >
> >I just use methode mentioned at
> >http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?PHPMapScriptAddPoint
> >
> >Regards
> >-bino-
> >
> >
> >
> >
> >
>
>
>



More information about the mapserver-users mailing list