Hello

There seems to be a problem with zoomQuery when no features match the query 
parameter: in this case the map extent is set to wrong values and mapscript 
issue a warning that breaks parsing of ajax response.

Of course it should be possible to set php error_reporting to none, but I feel 
there could be a better way.

I propose a patch to initmap.php that don't (re)set map extent in case no 
features 
match the query parameter.

The best option IMHO would be to warn the user with an alert window that say 
something like "Sorry, your query returned no data, setting map to full 
extent" or something like that.

This is the patch:

Insert after
http://svn.pmapper.net/trac/browser/pmapper/trunk/incphp/init/initmap.php#L550


        // Check if we have at least one result
        if(!count($qShpIdxArray)){
            return "map.phtml";
        }


-- 
Alessandro Pasotti
itOpen - "Open Solutions for the Net Age"
w3:  www.itopen.it
Linux User# 167502

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
pmapper-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pmapper-users

Reply via email to