Package org.openstreetmap.gui.jmapviewer

Examples of org.openstreetmap.gui.jmapviewer.MemoryTileCache


  private static final long serialVersionUID = 1L;
  private static final int HEIGHT = 500;
  private static final int WIDTH = 800;

  public OpenMapsViewer () {
     super(new MemoryTileCache(), 4);
     this.setPreferredSize(new Dimension(WIDTH, HEIGHT));
  }
View Full Code Here


  /**
   * @param name
   */
  public MapViewerLayer(String name) {
    this(name, new MemoryTileCache(), 4);
  }
View Full Code Here

        }
      }

      if (le.layer == null)
        le.layer = new MapViewerLayer(le.name,
            new WmsTileSource(le.url), new MemoryTileCache(), 6);
      // le.layer = new WMSLayer(le.name, le.url, null, mv);
      mv.addLayer(le.layer, false);
    }
    le.layer.visible = true;
    le.active = true;
View Full Code Here

    for (CapaInformacion c : CapaConsultas.getAll(true, false)) {
      if (c.isHabilitada()) {
        log.info("Cargamos la capa " + c);
        this.mapView.addLayer(
            new MapViewerLayer(c.getNombre(), new WmsTileSource(c
                .getUrl()), new MemoryTileCache(), 6), false);
        someLayer = true;
      } else
        log.info("La capa " + c + " no esta habilitada");
    }

    if (!someLayer) {
      log.info("Cargamos la capa por defecto");
      this.mapView.addLayer(new MapViewerLayer("OSM",
          new OsmTileSource.Mapnik(), new MemoryTileCache(), 16),
          false);
    }

    // Capas opcionales:

    final List<CapaInformacion> todasOpcionales = CapaConsultas.getAll(
        false, null);
    for (CapaInformacion c : todasOpcionales) {
      if (c.isHabilitada()) {
        final MapViewerLayer layer = new MapViewerLayer(c.getNombre(),
            new WmsTileSource(c.getUrl()), new MemoryTileCache(), 6);
        layer.visible = false;
        log.debug("Añadimos la capa " + c);

        this.mapView.addLayer(layer, false);
      }
View Full Code Here

        boolean large = iSizeButton.isEnlarged();
        firePropertyChange(RESIZE_PROP, !large, large);
    }

    public void toggleMapSource(TileSource tileSource) {
        this.tileController.setTileCache(new MemoryTileCache());
        this.setTileSource(tileSource);
        PROP_MAPSTYLE.put(tileSource.getName()); // TODO Is name really unique?
    }
View Full Code Here

        this.tileSource = tileSource;
        attribution.initialize(tileSource);

        currentZoomLevel = getBestZoom();

        tileCache = new MemoryTileCache();

        tileLoader = loaderFactory.makeTileLoader(this);
        if (tileLoader == null) {
            tileLoader = new OsmTileLoader(this);
        }
View Full Code Here

TOP

Related Classes of org.openstreetmap.gui.jmapviewer.MemoryTileCache

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.