[mapserver-commits] r13024 - trunk/mapserver
svn at osgeo.org
svn at osgeo.org
Wed Feb 1 08:13:07 EST 2012
Author: tbonfort
Date: 2012-02-01 05:13:07 -0800 (Wed, 01 Feb 2012)
New Revision: 13024
Modified:
trunk/mapserver/mapservutil.c
Log:
fix #4168 missing query modes
Modified: trunk/mapserver/mapservutil.c
===================================================================
--- trunk/mapserver/mapservutil.c 2012-02-01 12:28:42 UTC (rev 13023)
+++ trunk/mapserver/mapservutil.c 2012-02-01 13:13:07 UTC (rev 13024)
@@ -1641,36 +1641,35 @@
if(mapserv->CoordSource == FROMREFPNT) /* force browse mode if the reference coords are set */
mapserv->Mode = BROWSE;
- switch(mapserv->Mode) {
- case BROWSE:
- return msCGIDispatchBrowseRequest(mapserv);
- case QUERY:
- return msCGIDispatchQueryRequest(mapserv);
- case COORDINATE:
- return msCGIDispatchCoordinateRequest(mapserv);
- case TILE:
- /*
- ** Tile mode:
- ** Set the projection up and test the parameters for legality.
- */
- if( msTileSetup(mapserv) != MS_SUCCESS ) {
- return MS_FAILURE;
- }
- case MAP:
- case SCALEBAR:
- case REFERENCE:
- /* tile, map, scalebar and reference all need the extent to be set up correctly */
- if(setExtent(mapserv) != MS_SUCCESS) return MS_FAILURE;
- if(checkWebScale(mapserv) != MS_SUCCESS) return MS_FAILURE;
- return msCGIDispatchImageRequest(mapserv);
- case LEGEND:
- return msCGIDispatchLegendRequest(mapserv);
- case LEGENDICON:
- return msCGIDispatchLegendIconRequest(mapserv);
- default:
- msSetError(MS_WEBERR, "Bug: unsupported mode", "msDispatchRequest");
+ if(mapserv->Mode == TILE) {
+ /*
+ ** Tile mode:
+ ** Set the projection up and test the parameters for legality.
+ */
+ if( msTileSetup(mapserv) != MS_SUCCESS ) {
return MS_FAILURE;
+ }
}
+ if(mapserv->Mode == BROWSE) {
+ return msCGIDispatchBrowseRequest(mapserv);
+ } else if(mapserv->Mode == MAP || mapserv->Mode == SCALEBAR || mapserv->Mode == REFERENCE || mapserv->Mode == TILE) { /* "image" only modes */
+ /* tile, map, scalebar and reference all need the extent to be set up correctly */
+ if(setExtent(mapserv) != MS_SUCCESS) return MS_FAILURE;
+ if(checkWebScale(mapserv) != MS_SUCCESS) return MS_FAILURE;
+ return msCGIDispatchImageRequest(mapserv);
+ } else if(mapserv->Mode == LEGEND) {
+ return msCGIDispatchLegendRequest(mapserv);
+ } else if(mapserv->Mode == LEGENDICON) {
+ return msCGIDispatchLegendIconRequest(mapserv);
+ } else if(mapserv->Mode >= QUERY) {
+ return msCGIDispatchQueryRequest(mapserv);
+ } else if(mapserv->Mode == COORDINATE) {
+ return msCGIDispatchCoordinateRequest(mapserv);
+ }
+ else {
+ msSetError(MS_WEBERR, "Bug: unsupported mode", "msDispatchRequest");
+ return MS_FAILURE;
+ }
}
int msCGIHandler(const char *query_string, void **out_buffer, size_t *buffer_length) {
More information about the mapserver-commits
mailing list