PHP mapscipt: clone()
Gianfranco Brescia
ajfrank at ALICE.IT
Thu Sep 22 06:19:03 PDT 2005
Hi to all!
how do I have to use clone()?
Is my script correct?
....
$selezionati = $this->selezionati;
$layer = $this->map->getLayerByName('polli');
$classeselezionati = $layer->getclass(1);
foreach ($selezionati as $v)
{
$classi[$i] = ms_newClassObj($layer);
$classi[$i] = $classeselezionati->clone();
$classi[$i] -> setexpression($v);
$i = $i+1;
}
...
Mapfile:
....
CLASSITEM "codice_all"
CLASS
NAME "centrobuffer"
STYLE
SYMBOL bollo
SIZE 5
COLOR 255 0 0
END
EXPRESSION '0'
END
CLASS
NAME "selezionati"
STYLE
SYMBOL bollo
SIZE 4
COLOR 0 255 0
END
EXPRESSION '0'
END
CLASS
NAME "noselezionati"
STYLE
SYMBOL bollo
SIZE 3
COLOR 150 150 250
END
EXPRESSION /./
END
.....
Thank you! Ciao.
More information about the MapServer-users
mailing list