[Mapserver-users] box to select point php mapscript

Sylvain Beorchia sbeorchia at gi-lemans.fr
Wed Jun 16 08:42:35 EDT 2004


Hi all,

You don't have to draw another layer to change the style of an object.
Just before drawing the map :


$oLayer = $gpoMap->getLayerByName('foyers');    // foyers is the name of my
layer
$oLayer->set("status", 1);

$sym1 = $gpoMap->getSymbolByName ( "BF125" );    // retreive a symbol from
the symbol file

$class = $oLayer->getClass (0);    // retreive the class of the layer on
which the objects are
$style = $class->getStyle(0);            // retreive the style
$style->color->setRGB(0, 255, 0);    // change the style
$style->set ( 'symbol', $sym1 );        // change the style

$img = $gpoMap->draw();
$url = $img->saveWebImage($gAppletImgFmt, 0, 0, -1);
...

It works very well.
Tell me how u find this code.

Thank u.
Sylvain.


----- Original Message ----- 
From: "Sébastien DUBOIS" <sebastien.dubois at esm2.imt-mrs.fr>
To: <mapserver-users at lists.gis.umn.edu>
Sent: Wednesday, June 16, 2004 1:40 PM
Subject: [Mapserver-users] box to select point php mapscript


> i'm working on how to do in mapscript/php a box to select some of my
> shapefile's
> points displayed (the points are taken from a postgresql/postgis table)
and
> then  change the style of the selected point and put them in another table
or
> file.
> i know that the way to change the style of the selected points is to draw
> another layer up the last one.
> but how can i select my points and create a new table with them.
>
> in another application i've use jbox to do the selection by a box and
display
> the attributes in another frame. this works well but the architecture is
not
> very clear (liveConnect is used between javascript and the java applet
Jbox)
> and working with phpmapscript allow more flexibility...
>
> i've read lots of post but i dream to have an explication of the way to
code
> this and to read a code example ;-)
>
> thanks in advance
> -- 
> Sébastien DUBOIS
> Portable: 0622751265
> 1024D/A1140BCB:1BC8 7E21 4DA7 13D5 1B5F  876F F719 2B7A A114 0BCB
>
>
>
>
>
> -------------------------------------------------
> This mail sent through IMP: http://horde.org/imp/
>
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list