[mapserver-commits] r10028 - trunk/mapserver

svn at osgeo.org svn at osgeo.org
Mon Mar 29 17:27:00 EDT 2010


Author: warmerdam
Date: 2010-03-29 17:26:59 -0400 (Mon, 29 Mar 2010)
New Revision: 10028

Modified:
   trunk/mapserver/HISTORY.TXT
   trunk/mapserver/maptemplate.c
Log:
avoid adjusting map->extent in checkWebScale() (#3413)

Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT	2010-03-29 21:23:45 UTC (rev 10027)
+++ trunk/mapserver/HISTORY.TXT	2010-03-29 21:26:59 UTC (rev 10028)
@@ -14,6 +14,8 @@
 Current Version (SVN trunk):
 ----------------------------
 
+- Fix MS_NONSQUARE to work in mode=map (#3413)
+
 - Support inclusion of raster layers in query map drawing even if the results
   may not be that useful (#1842).
 

Modified: trunk/mapserver/maptemplate.c
===================================================================
--- trunk/mapserver/maptemplate.c	2010-03-29 21:23:45 UTC (rev 10027)
+++ trunk/mapserver/maptemplate.c	2010-03-29 21:26:59 UTC (rev 10028)
@@ -145,9 +145,10 @@
 int checkWebScale(mapservObj *mapserv) 
 {
   int status;
+  rectObj work_extent = mapserv->map->extent;
 
-  mapserv->map->cellsize = msAdjustExtent(&(mapserv->map->extent), mapserv->map->width, mapserv->map->height); /* we do this cause we need a scale */
-  if((status = msCalculateScale(mapserv->map->extent, mapserv->map->units, mapserv->map->width, mapserv->map->height, mapserv->map->resolution, &mapserv->map->scaledenom)) != MS_SUCCESS) return status;
+  mapserv->map->cellsize = msAdjustExtent(&(work_extent), mapserv->map->width, mapserv->map->height); /* we do this cause we need a scale */
+  if((status = msCalculateScale(work_extent, mapserv->map->units, mapserv->map->width, mapserv->map->height, mapserv->map->resolution, &mapserv->map->scaledenom)) != MS_SUCCESS) return status;
 
   if((mapserv->map->scaledenom < mapserv->map->web.minscaledenom) && (mapserv->map->web.minscaledenom > 0)) {
     if(mapserv->map->web.mintemplate) { /* use the template provided */



More information about the mapserver-commits mailing list