Package org.zkoss.openlayers.control

Examples of org.zkoss.openlayers.control.LayerSwitcher


          bounds.toGeometry());
      boxes.addFeature(box);
    }

    map.addLayers(Arrays.asList(ol_wms, boxes));
    map.addControl(new LayerSwitcher());
    Control sf = new SelectFeature(boxes);
    map.addControl(sf);
    sf.activate();
    map.zoomToMaxExtent();
View Full Code Here


  public void doAfterCompose(Window comp) throws Exception {
    super.doAfterCompose(comp);
    map.addLayer(new WMS("OpenLayers WMS",
        "http://vmap0.tiles.osgeo.org/wms/vmap0", toMap(pair("layers",
            "basic"))));
    map.addControl(new LayerSwitcher());
    map.setCenter(new LonLat(5, 40), 5, false, false);

  }
View Full Code Here

    super.doAfterCompose(comp);
    map.addLayer(new GoogleV3("Google Streets",  toMap(pair("type", GoogleV3.Type.ROADMAP))));
    map.addLayer(new GoogleV3("Google Satellite", toMap(pair("numZoomLevels", 20))));
    map.addLayer(new GoogleV3("Google Hybrid", toMap(pair("type", GoogleV3.Type.HYBRID), pair("numZoomLevels", 20))));
    map.addLayer(new GoogleV3("Google Physical", toMap(pair("type", GoogleV3.Type.SATELLITE), pair("numZoomLevels", 22))));
    map.addControl(new LayerSwitcher());
    map.setCenter(new LonLat(10.2, 48.9).transform(new Projection("EPSG:4326"),
        map.getProjection()), 5, false, false);
  }
View Full Code Here

    // create a vector layer for drawing
    Layer vector = new Vector("Editable Vectors");

    map.addLayers(Arrays.asList(ve, merc, vector));
    map.addControl(new LayerSwitcher());
    map.addControl(new EditingToolbar(vector));
    map.zoomToMaxExtent();
  }
View Full Code Here

TOP

Related Classes of org.zkoss.openlayers.control.LayerSwitcher

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.