[mapserver-users] perl mapscript queryByRect() and queryByPoint() in 3.5

imap at chesapeake.net imap at chesapeake.net
Wed May 8 05:39:25 EDT 2002



Guys, I wanted to contribute some stuff to the Perl MapScript Wiki,
but when I went to test things out, all my query stuff is broken
under version 3.5/3.6.  

Going over some recent emails in the archive,
it is my understanding that queryByRect($rect) now returns
an integer (I am guessing status) and you have to get the
results from the layer->{'resultcache'}.  

$layer = $querymap->getLayerByName("county");
$status = $map->queryByRect($rect);
print "status of query: ".$status."\n";
$results = $layer->{'resultcache'};
print "number of results: ".$results->{'numresults'}."\n";

status of query: 1
number of results: 


------- mapfile ----------

LAYER
  NAME county
  TYPE LINE
  STATUS ON
  DATA "dtl_cnty"
  TEMPLATE dummy
END


bah...  and queryByPoint() is behaving the same way.
Does anybody have an example of queryByRect() and/or
queryByPoint() working in perl mapscript?

Regards,

Chris



More information about the mapserver-users mailing list