[mapserver-users] Request feature mapscript, Selecting a Class by Name
Tom Myny
tom at internetgids.be
Thu Oct 10 05:43:12 PDT 2002
Hi Mapserver users,
Is it possible to select a class by name in a Layer. Something like
getClassbyname ?
I use the feature getlayerbyname to select a Layer but for Classes i must
use an integer :/
Can this feature be enabled in mapscript ?
My mapfile:
layer
classitem "ID_"
data "poi"
name "poi"
status off
MAXSCALE 10000
type point
# 1 query #none
class
status off
expression /1227/
symbol 'symbols/images/nmbs.gif'
end
class
status off
expression /998/
symbol 'symbols/images/998.gif'
end
class
status off
expression /999/
symbol 'symbols/images/999.gif'
My code (for now):
$symLayer = $gpoMap->getlayerbyname(poi);
$symLayer->set("status", 1);
$symobjclass = $symLayer->getClass('1');
$symobjclass->set("status", 1);
$symobjclass = $symLayer->getClass('2');
$symobjclass->set("status", 1);
Hope that this will be a new feature,
Kind Regards,
Tom
More information about the MapServer-users
mailing list