[mapserver-commits] r7243 -
trunk/mapserver/mapscript/csharp/examples
svn at osgeo.org
svn at osgeo.org
Thu Jan 3 12:42:53 EST 2008
Author: tamas
Date: 2008-01-03 12:42:52 -0500 (Thu, 03 Jan 2008)
New Revision: 7243
Modified:
trunk/mapserver/mapscript/csharp/examples/drawquery.cs
Log:
Ignore the zoomToResults option if no query results have been returned.
Modified: trunk/mapserver/mapscript/csharp/examples/drawquery.cs
===================================================================
--- trunk/mapserver/mapscript/csharp/examples/drawquery.cs 2008-01-03 15:49:53 UTC (rev 7242)
+++ trunk/mapserver/mapscript/csharp/examples/drawquery.cs 2008-01-03 17:42:52 UTC (rev 7243)
@@ -96,8 +96,13 @@
}
}
// setting the map extent to the result bounds
- if (zoomToResults)
- map.setExtent(query_bounds.minx, query_bounds.miny, query_bounds.maxx, query_bounds.maxy);
+ if (query_bounds != null)
+ {
+ if (zoomToResults)
+ map.setExtent(query_bounds.minx, query_bounds.miny, query_bounds.maxx, query_bounds.maxy);
+ }
+ else
+ Console.WriteLine("The query returned 0 results ...");
}
catch (Exception e)
{
More information about the mapserver-commits
mailing list