[Mapserver-users] Query a layer with setFilter

Andres Garcia listamapserver at hotmail.com
Mon Dec 23 09:17:30 PST 2002


Hi list members!!

I want to query a layer, having the ids of the elements. I'm using this 
code:

$results[] = "2";
$results[] = "468";
$results[] = "246";
$layer = $mapa->getLayerByName("popplace");
$layer->set("filteritem","popplace_");
for ( $i=0; $i<count($results); $i++) {
    $layer->setFilter("\"$results[$i]\"");
}
$layer->queryByAttributes(MS_MULTIPLE);
$num_results = $layer->getNumResults();
$map->drawQuery();

The problem with that code is that always returns only the last element of 
the array.

How can i get all the results???

thanks in advance!!

_________________________________________________________________
MSN. Más Útil Cada Día http://www.msn.es/intmap/




More information about the MapServer-users mailing list