Package org.zkoss.openlayers.base

Examples of org.zkoss.openlayers.base.Projection


    map.addLayer(new Bing(toMap(pair("key", apiKey),
        pair("type", "AerialWithLabels"),
        pair("name", "Bing Aerial With Labels"))));

    map.addControl(new LayerSwitcher());
    map.setCenter(new LonLat(-71.147, 42.472).transform(new Projection(
        "EPSG:4326"), map.getProjection()), 11);

  }
View Full Code Here


  public void doAfterCompose(Window comp) throws Exception {
    super.doAfterCompose(comp);
    map.addLayer(new OSM("Simple OSM Map"));
    map.setCenter(new LonLat(-71.147, 42.472).transform(
                new Projection("EPSG:4326"),
                map.getProjection()), 12, false, false);

  }
View Full Code Here

   
  }
  @Listen("onClick=#center")
  public void centerMap(Event evt) {
    if (lat.getValue() == null && lon.getValue() == null)
      myComp.setCenter(new LonLat(116, 25.9).transform(new Projection("EPSG:4326"), myComp.getProjection()), zoom.getValue(), false, false);
    else
      myComp.setCenter(new LonLat(lon.doubleValue(), lat.doubleValue()).transform(new Projection("EPSG:4326"), myComp.getProjection()), zoom.getValue(), false, false);
    //myComp.invalidate();
  }
View Full Code Here

      myComp.setCenter(new LonLat(lon.doubleValue(), lat.doubleValue()).transform(new Projection("EPSG:4326"), myComp.getProjection()), zoom.getValue(), false, false);
    //myComp.invalidate();
  }
  @Listen("onClick=#office")
  public void gotoOffice(Event evt) {
    myComp.setCenter(new LonLat(121.5272, 25.0495).transform(new Projection("EPSG:4326"), myComp.getProjection()), 20, false, true);
   
  }
View Full Code Here

    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(23.342453, 120.320154).transform(
        new Projection("EPSG:900913"), new Projection("EPSG:4326")), 4,
        false, false);

  }
View Full Code Here

  public GoogleV3(String name, Map options) {
    super(name, options);
  }
  @Override
  public Projection getProjection() {
    return new Projection("EPSG:900913");
  }
View Full Code Here

    return _url;
  }

  @Override
  public Projection getProjection() {
    return new Projection("EPSG:900913");
  }
View Full Code Here

      return (Projection) _options.get("displayProjection");
    return null;
  }
 
  public Projection getProjection() {
    Projection proj = null;
    if (this._baseLayer != null)
      proj = this._baseLayer.getProjection();
    if (proj != null)
      return proj;
    if (_options != null)
View Full Code Here

  @SuppressWarnings("unchecked")
  public void doAfterCompose(Window comp) throws Exception {
    super.doAfterCompose(comp);
    map.setOptions(toMap(
        pair("projection", new Projection("EPSG:900913")),
        pair("displayProjection", new Projection("EPSG:4326")),
        pair("units", "m"),
        pair("maxResolution", 156543.0339),
        pair("maxExtent", new Bounds(-20037508, -20037508, 20037508,
            20037508))));
View Full Code Here

    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

TOP

Related Classes of org.zkoss.openlayers.base.Projection

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.