[Mapserver-users] querying layers separately does not hilite items
Nikolai Vladychevski
niko at isl.net.mx
Mon Feb 2 10:29:08 PST 2004
Hi again,
I am still trying to hilite in different colors the items queried, but the
items are not hiliten at all. Here is my code:
$qimg=$map->prepareImage();
for (my $lidx=0;$lidx< $map->{numlayers};$lidx++) {
my $l=$map->getLayer($lidx);
$res=$l->queryByPoint($map,$queryPt,$mapscript::MS_MULTIPLE,0);
$void=$l->drawQuery($map,$qimg);
}
$void=$qimg->save("$Constants::IMGTMPDIR/$imgfile");
When I use $layer->drawQuery it just draws the layer with no hiliting, and
when I use $map->drawQuery it hilites the items. I checked the sources and
definitely $layer->drawQuery is nothing more than simple draw().
from the mapscript.i:
MapObj:
%newobject drawQuery;
imageObj *drawQuery() {
return msDrawQueryMap(self);
}
LayerObj:
int draw(mapObj *map, imageObj *image) {
return msDrawLayer(map, self, image);
}
int drawQuery(mapObj *map, imageObj *image) {
return msDrawLayer(map, self, image);
}
this is in mapserver 4.0.1. Looks like there is no other way to hilite in
different colors than merging two images, but perl does not have
pasteImage() function like php API.
Can anyone confirm this? Any comments?
Thanks in advance
Nikolai
More information about the MapServer-users
mailing list