Stefan Schwarzer writes:
Hi,
my application offers the possibility to preselect countries that should
be displayed on the map. Thus, instead of having all countries, I get
only these preselected ones mapped; the others are grayed out. But if a
user now uses the query tool and clicks on one of those not-preselected
countries, than an mapscript error occurs (naturally). Is there a way to
react on such an error warning and continue at another point, so that
this "problem" is just ignored and the application can continue to work?
if (!$imgbox)
$map -> queryByPoint($click_pt, MS_MULTIPLE, -1); // here is then the
error
else
$map -> queryByRect($click_rt);
"Warning: [MapServer Error]: msQueryByPoint(): No matching record(s)
found. in /www/geodataportal/htdocs/mod_map/etc/php/query.php on line 42"
Thanks for any help!
Stefan,
Being that is just a warning message you should be able to set a variable to
the result of the queryByPoint and then test for MS_SUCCESS or MS_FAILURE
and react accordingly.
Lowell
- Re: [UMN_MAPSERVER-USERS] React on query error Lowell.Filak
-