Package com.google.gwt.maps.client.geom

Examples of com.google.gwt.maps.client.geom.LatLng


  }

  public void testMarkerShowMapBlowup() {
    loadApi(new Runnable() {
      public void run() {
        LatLng center = LatLng.newInstance(0, 0);
        final MapWidget map = new MapWidget(center, 1);
        map.setSize("300px", "300px");
        Marker m = new Marker(center);
        map.addOverlay(m);
        RootPanel.get().add(map);
View Full Code Here


  }

  public void testMarkerShowMapBlowupContent() {
    loadApi(new Runnable() {
      public void run() {
        LatLng center = LatLng.newInstance(0, 0);
        final MapWidget map = new MapWidget(center, 1);
        map.setSize("300px", "300px");
        Marker m = new Marker(center);
        map.addOverlay(m);
        RootPanel.get().add(map);
View Full Code Here

          public double computeZIndex(Marker marker) {
            return (count = count - 1);
          }
        });

        LatLng p1 = LatLng.newInstance(45, 45);
        LatLng p2 = LatLng.newInstance(50, 50);
        Marker m1 = new Marker(p1, opts);
        Marker m2 = new Marker(p2, opts);

        MapWidget map = new MapWidget(p1, 1);
        map.setSize("300px", "300px");
View Full Code Here

  public void onShow() {
    map.clearOverlays();

    // Add 10 markers to the map at random locations
    LatLngBounds bounds = map.getBounds();
    LatLng southWest = bounds.getSouthWest();
    LatLng northEast = bounds.getNorthEast();
    double lngSpan = northEast.getLongitude() - southWest.getLongitude();
    double latSpan = northEast.getLatitude() - southWest.getLatitude();
    for (int i = 0; i < 10; i++) {
      LatLng point = LatLng.newInstance(southWest.getLatitude() + latSpan
          * Math.random(), southWest.getLongitude() + lngSpan * Math.random());
      map.addOverlay(createMarker(point, i));
    }
  }
View Full Code Here

  public void testPolygonEndLineTrigger() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final Polygon polyline = setupPolygon(m);
        final LatLng testLatLng = LatLng.newInstance(31, 32);

        m.addOverlay(polyline);
        polyline.setDrawingEnabled();
        polyline.addPolygonEndLineHandler(new PolygonEndLineHandler() {
View Full Code Here

   * Test the default Icon() constructor.
   */
  public void testIconDefaultConstructor() {
    loadApi(new Runnable() {
      public void run() {
        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        final MapWidget map = new MapWidget(atlanta, 13);
        map.setSize("300px", "300px");

        Icon ic = Icon.newInstance();
        ic.setImageURL("house.png");
View Full Code Here

   */
  public void testIconFromDefault() {
    loadApi(new Runnable() {
      public void run() {

        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        final MapWidget map = new MapWidget(atlanta, 13);
        map.setSize("300px", "300px");

        Icon ic = Icon.newInstance(Icon.getDefaultIcon());
        ic.setIconSize(Size.newInstance(30, 30));
View Full Code Here

   * Test the Icon(String) constructor.
   */
  public void testIconFromURL() {
    loadApi(new Runnable() {
      public void run() {
        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        final MapWidget map = new MapWidget(atlanta, 13);
        map.setSize("300px", "300px");

        Icon ic = Icon.newInstance("house.png");
        ic.setIconSize(Size.newInstance(30, 30));
View Full Code Here

  }

  public void testMarkerClickTrigger() {
    loadApi(new Runnable() {
      public void run() {
        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        final MapWidget map = new MapWidget(atlanta, 13);
        map.setSize("300px", "300px");
        RootPanel.get().add(map);

        final Marker marker = new Marker(atlanta);
View Full Code Here

  }

  public void testMarkerDoubleClickTrigger() {
    loadApi(new Runnable() {
      public void run() {
        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        final MapWidget map = new MapWidget(atlanta, 13);
        map.setSize("300px", "300px");
        RootPanel.get().add(map);

        final Marker marker = new Marker(atlanta);
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.geom.LatLng

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.