Package org.zkoss.openlayers.layer

Examples of org.zkoss.openlayers.layer.Layer


  private Openlayers map2;

  public void doAfterCompose(Window comp) throws Exception {
    super.doAfterCompose(comp);
    // set up some layers
    Layer ol = new WMS(
              "OpenLayers WMS",
              "http://vmap0.tiles.osgeo.org/wms/vmap0",
              toMap(pair("layers", "basic"))
          );
    Layer jpl = new WMS(
        "NASA Global Mosaic",
              "http://t1.hypercube.telascience.org/cgi-bin/landsat7",
              toMap(pair("layers", "landsat7"))
          );
               
        // A clone of the above layer that we will use as overview for map2.
        // We need to clone jpl before the it gets added to a map, so the
        // clone can have its own maxExtent and maxResolution instead of
        // getting these settings initialized from map1.
    Layer jplOverview = (Layer)jpl.clone();
       
        // A more detailled layer of Manhattan for map2
        Layer ny = new WMS(
            "Manhattan",
            "http://demo.opengeo.org/geoserver/wms",
            toMap(pair("layers", "tiger-ny"), pair("format", "image/png"))
        );
               
View Full Code Here


  }
  public void service(org.zkoss.zk.au.AuRequest request, boolean everError) {
    final String cmd = request.getCommand();
    if (cmd.equals(OLEvents.ON_CHANGEBASELAYER)) {
      String layerId = (String)request.getData().get("");
      Layer layer = _layers.get(layerId);
      if (layer != null)
        Events.postEvent(OLEvents.ON_CHANGEBASELAYER, this, layer);
    } else
      super.service(request, everError);
  }
View Full Code Here

    Double[][] box_extents = new Double[][] {
        new Double[] { -10.0, 50.0, 5.0, 60.0 },
        new Double[] { -75.0, 41.0, -71.0, 44.0 },
        new Double[] { -122.6, 37.6, -122.3, 37.9 },
        new Double[] { 10.0, 10.0, 20.0, 20.0 } };
    Layer ol_wms = new WMS("OpenLayers WMS",
        "http://vmap0.tiles.osgeo.org/wms/vmap0", toMap(pair("layers",
            "basic")));
    Vector boxes = new Vector("Boxes");

    for (int i = 0; i < box_extents.length; i++) {
View Full Code Here

        pair("maxExtent", new Bounds(-20037508, -20037508, 20037508,
            20037508)));
    map.setOptions(options);
   
    // OpenLayers.Layer.MultiMap is deprecated, use Bing instead.
    Layer ve = new Bing(toMap(pair("key", apiKey),
        pair("type", "Road"),
        // custom metadata parameter to request the new map style - only
        // useful
        // before May 1st, 2011
        pair("metadataParams", toMap(pair("mapVersion", "v1"))),
        pair("sphericalMercator",
            true)));
   
    Layer merc = new WMS("World Map",
        "http://maps.opengeo.org/geowebcache/service/wms", toMap(pair(
            "layers", "bluemarble")), toMap(pair("opacity", 0.4),
            pair("isBaseLayer", false), pair("wrapDateLine", true)));

    // 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.layer.Layer

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.