Revision 6903 org.gvsig.raster/branches/org.gvsig.raster.2.4/org.gvsig.raster.googlemaps/org.gvsig.raster.googlemaps.provider.legend/src/main/java/org/gvsig/raster/googlemaps/provider/legend/GoogleMapsRasterGetLegend.java

View differences:

GoogleMapsRasterGetLegend.java
28 28

  
29 29
import org.gvsig.fmap.dal.raster.api.RasterStore;
30 30
import org.gvsig.raster.googlemaps.provider.GoogleMapsRasterProvider;
31
import org.gvsig.raster.lib.legend.api.ColorInterpretation;
32
import org.gvsig.raster.lib.legend.api.ColorTable;
33 31
import org.gvsig.raster.lib.legend.api.RasterLegend;
34 32
import org.gvsig.raster.lib.legend.api.RasterLegendLocator;
35 33
import org.gvsig.raster.lib.legend.api.RasterLegendManager;
34
import org.gvsig.raster.lib.legend.api.colorinterpretation.ColorInterpretation;
35
import org.gvsig.raster.lib.legend.api.colortable.ColorTable;
36 36
import org.gvsig.tools.ToolsLocator;
37 37
import org.gvsig.tools.dynobject.DynClass;
38 38
import org.gvsig.tools.dynobject.DynMethod;
......
87 87
            invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORINTERPRETATION_NAME, null);
88 88

  
89 89
        legend= legendManager.createLegend(colorInterpretation);
90
        if ( !( colorInterpretation.isBGR() || colorInterpretation.isRGB() || colorInterpretation.isRGBA() ) ){
91
            ColorTable colorTable=(ColorTable)provider.
92
                invokeDynMethod(RasterStore.DYNMETHOD_GETCOLORTABLE_NAME, null);
93
            legend.setColorTable(colorTable);
94
        }
95 90

  
96 91
        return legend;
97 92
    }

Also available in: Unified diff