Permalink
Browse files

apply scaletoken substitutions to raster draws (#4538)

  • Loading branch information...
tbonfort committed Feb 25, 2013
1 parent 8811a4c commit 43221d9de86ed4337c78b39d38f20c49009431c4
Showing with 17 additions and 8 deletions.
  1. +15 −8 mapdraw.c
  2. +2 −0 mapserver.h
View
@@ -1470,14 +1470,21 @@ msDrawRasterLayerPlugin( mapObj *map, layerObj *layer, imageObj *image)
*/
int msDrawRasterLayer(mapObj *map, layerObj *layer, imageObj *image)
{
if (image && map && layer) {
if( MS_RENDERER_PLUGIN(image->format) ) {
return msDrawRasterLayerPlugin(map, layer, image);
} else if( MS_RENDERER_RAWDATA(image->format) )
return msDrawRasterLayerLow(map, layer, image, NULL);
}
return MS_FAILURE;
int rv = MS_FAILURE;
if (!image || !map || !layer) {
return rv;
}
/* RFC-86 Scale dependant token replacements*/
rv = msLayerApplyScaletokens(layer,(layer->map)?layer->map->scaledenom:-1);
if (rv != MS_SUCCESS) return rv;
if( MS_RENDERER_PLUGIN(image->format) )
rv = msDrawRasterLayerPlugin(map, layer, image);
else if( MS_RENDERER_RAWDATA(image->format) )
rv = msDrawRasterLayerLow(map, layer, image, NULL);
msLayerRestoreFromScaletokens(layer);
return rv;
}
/**
View
@@ -2188,6 +2188,8 @@ extern "C" {
MS_DLL_EXPORT void msLayerFreeItemInfo(layerObj *layer);
MS_DLL_EXPORT int msLayerOpen(layerObj *layer); /* in maplayer.c */
MS_DLL_EXPORT int msLayerApplyScaletokens(layerObj *layer, double scale);
MS_DLL_EXPORT int msLayerRestoreFromScaletokens(layerObj *layer);
MS_DLL_EXPORT int msClusterLayerOpen(layerObj *layer); /* in mapcluster.c */
MS_DLL_EXPORT int msLayerIsOpen(layerObj *layer);
MS_DLL_EXPORT void msLayerClose(layerObj *layer);

0 comments on commit 43221d9

Please sign in to comment.