[mapserver-commits] r8929 - sandbox/graphics

svn at osgeo.org svn at osgeo.org
Mon Apr 20 01:01:28 EDT 2009


Author: tbonfort
Date: 2009-04-20 01:01:27 -0400 (Mon, 20 Apr 2009)
New Revision: 8929

Modified:
   sandbox/graphics/maplegend.c
   sandbox/graphics/mapscale.c
Log:
warning message for scale and legend


Modified: sandbox/graphics/maplegend.c
===================================================================
--- sandbox/graphics/maplegend.c	2009-04-19 17:37:25 UTC (rev 8928)
+++ sandbox/graphics/maplegend.c	2009-04-20 05:01:27 UTC (rev 8929)
@@ -42,6 +42,11 @@
  */
 int msDrawLegendIcon(mapObj *map, layerObj *lp, classObj *class, int width, int height, imageObj *img, int dstX, int dstY)
 {
+  if(MS_RENDERER_PLUGIN(map->outputformat)) {
+    msSetError(MS_GDERR, "Not implemented", "msCreateLegendIcon()");
+    return MS_FAILURE;
+  }
+
 #ifdef USE_AGG
   if(MS_RENDERER_AGG(map->outputformat))
     return msDrawLegendIconAGG(map,lp,class,width,height,img,dstX,dstY);
@@ -243,7 +248,12 @@
   };
   typedef struct legend_struct legendlabel;
   legendlabel *head=NULL,*cur=NULL;
-
+  
+  if(MS_RENDERER_PLUGIN(map->outputformat)) {
+    msSetError(MS_MISCERR, "Scalebar not supported yet", "msDrawScalebar()");
+    return(NULL);
+  }
+  
   if(msValidateContexts(map) != MS_SUCCESS) return NULL; /* make sure there are no recursive REQUIRES or LABELREQUIRES expressions */
   if(msLegendCalcSize(map, scale_independent, &size_x, &size_y, NULL) != MS_SUCCESS) return NULL;
 
@@ -401,6 +411,11 @@
   pointObj point;
   imageObj *image = NULL;
 
+  if(MS_RENDERER_PLUGIN(map->outputformat)) {
+    msSetError(MS_MISCERR, "Scalebar not supported yet", "msDrawScalebar()");
+    return MS_FAILURE;
+  }
+
   s = msGetSymbolIndex(&(map->symbolset), "legend", MS_FALSE);
   if(s == -1) {
     if(msGrowSymbolSet(&map->symbolset) == NULL)

Modified: sandbox/graphics/mapscale.c
===================================================================
--- sandbox/graphics/mapscale.c	2009-04-19 17:37:25 UTC (rev 8928)
+++ sandbox/graphics/mapscale.c	2009-04-20 05:01:27 UTC (rev 8929)
@@ -163,6 +163,11 @@
     msSetError(MS_MISCERR, "Map units not set.", "msDrawScalebar()");
     return(NULL);
   }
+
+  if(MS_RENDERER_PLUGIN(map->outputformat)) {
+    msSetError(MS_MISCERR, "Scalebar not supported yet", "msDrawScalebar()");
+    return(NULL);
+  }
 /*
  *  Allow scalebars to use TrueType fonts for labels (jnovak at novacell.com)
  *



More information about the mapserver-commits mailing list