Revision 44244 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.mapcontext/org.gvsig.fmap.mapcontext.api/src/main/java/org/gvsig/fmap/mapcontext/MapContext.java

View differences:

MapContext.java
69 69
import org.gvsig.fmap.mapcontext.layers.order.LayerOrderManager;
70 70
import org.gvsig.fmap.mapcontext.layers.vectorial.FLyrVect;
71 71
import org.gvsig.fmap.mapcontext.layers.vectorial.GraphicLayer;
72
import org.gvsig.fmap.mapcontext.layers.vectorial.VectorLayer;
72 73
import org.gvsig.fmap.mapcontext.rendering.legend.events.listeners.LegendListener;
73 74
import org.gvsig.fmap.mapcontext.rendering.strategies.SelectedEnvelopeVisitor;
74 75
import org.gvsig.timesupport.AbsoluteInstant;
......
386 387
     */
387 388
//    private GraphicLayer tracLayer = null;
388 389
    private static final String DEFAULT_TRACTLAYER = "Default";
389
    private Map<String, GraphicLayer> tracLayers;
390
    private Map<String, VectorLayer> tracLayers;
390 391
    //MapContextLocator.getMapContextManager().createGraphicsLayer(getProjection());
391 392

  
392 393
    /**
......
840 841
            }
841 842
        };
842 843
        this.getMapContextDrawer().print(this.layers, g, cancel, scale, properties);
843
        for (GraphicLayer tracLayer : this.tracLayers.values()) {
844
        for (VectorLayer tracLayer : this.tracLayers.values()) {
844 845
            if (tracLayer != null) {
845 846
                tracLayer.draw(null, g, viewPort, cancel, scale);
846 847
            }
......
1283 1284
    public Envelope getFullEnvelope() throws ReadException {
1284 1285
        Envelope envelope = layers.getFullEnvelope();
1285 1286

  
1286
        for (GraphicLayer tracLayer : this.tracLayers.values()) {
1287
        for (VectorLayer tracLayer : this.tracLayers.values()) {
1287 1288
            if (tracLayer != null) {
1288 1289
                Envelope graphicsEnvelope = tracLayer.getFullEnvelope();
1289 1290
                if( graphicsEnvelope==null ) {
......
1423 1424
        layers2.addLayerCollectionListener(layerEventListener);
1424 1425
    }
1425 1426

  
1426
    public GraphicLayer getGraphicsLayer(String name) {
1427
    public VectorLayer getGraphicsLayer(String name) {
1427 1428
        return this.tracLayers.get(name);
1428 1429
    }
1429 1430
    
1430
    public void setGraphicsLayer(String name, GraphicLayer layer) {
1431
    public void setGraphicsLayer(String name, FLyrVect layer) {
1431 1432
        this.tracLayers.put(name, layer);
1432 1433
    }
1433 1434
    
......
1444 1445
     * @see #setGraphicsLayer(GraphicLayer)
1445 1446
     */
1446 1447
    public GraphicLayer getGraphicsLayer() {
1447
        GraphicLayer tracLayer = this.tracLayers.get(DEFAULT_TRACTLAYER);
1448
        GraphicLayer tracLayer = (GraphicLayer) this.tracLayers.get(DEFAULT_TRACTLAYER);
1448 1449
        if (tracLayer == null) {
1449 1450
            if (getViewPort() != null) {
1450 1451
                tracLayer
......
1729 1730

  
1730 1731
    protected void doDispose() throws BaseException {
1731 1732
        dispose(layers);
1732
        for (GraphicLayer tracLayer : this.tracLayers.values()) {
1733
        for (VectorLayer tracLayer : this.tracLayers.values()) {
1733 1734
            dispose(tracLayer);
1734 1735
        }
1735 1736
    }

Also available in: Unified diff