drawQuery for a single layer

Stefan Schwarzer stefan.schwarzer at GRID.UNEP.CH
Thu Feb 2 07:42:28 EST 2006


But how exactly do I "select" layers that should be queried. It's a long time ago that I wrote that
code, so I hardly remember how I have done it....

The query code looks something like this:

  //Get the Layer being queried
  $Layer = $map -> GetLayerByName($lyr_name);
  $data_nm = $Layer -> data;
  $data_pth = $map -> shapepath;
  $shpPath = $data_pth."/".$data_nm;

                ......

  $numResults = $Layer -> getNumResults();
  $oLayer = $map -> getLayer($Layer -> index);

  // Open layer's table... take the list of fields to display from
  // the "HEADERRESULT_FIELDS" metadata in the layer object.
  $oLayer -> open();

                 .......

Don't know if this helps. I still feel irritated to see that in this code it queries a single layer, but
that the drawQuery later than highlights (at least) two layers (probably all displayed ones).



More information about the mapserver-users mailing list