Examples of LatLng


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

   */
  public void testMapMouseOverTrigger() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final LatLng latlng = LatLng.newInstance(1.0, 2.0);
        m.addMapMouseOverHandler(new MapMouseOverHandler() {
          public void onMouseOver(MapMouseOverEvent event) {
            assertEquals(event.getSender(), m);
            assertEquals(latlng, event.getLatLng());
            finishTest();
View Full Code Here

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

  }

  public void testMapMoveEndEvent() {
    loadApi(new Runnable() {
      public void run() {
        final LatLng end = LatLng.newInstance(37.4569, -122.1569);
        final MapWidget m = new MapWidget();

        /*
         * The Move event gets called on setCenter(). There is a setCenter()
         * call implicit in the MapWidget() constructor. Add to the map now so
View Full Code Here

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

        assertEquals(true, getBoolean(opts, "enableFullScreen"));
        opts.setEnableFullScreen(false);
        assertEquals(false, getBoolean(opts, "enableFullScreen"));

        StreetviewFeatures features = StreetviewFeatures.newInstance();
        LatLng ll = LatLng.newInstance(-1, 1);
        Pov pov = Pov.newInstance();
        StreetviewUserPhotosOptions photoOpts = StreetviewUserPhotosOptions.newInstance();

        // Intentional repetition to check builder pattern
        opts.setEnableFullScreen(false).setFeatures(features).setLatLng(ll).setPov(
View Full Code Here

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

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

        final LatLng start = LatLng.newInstance(37.4419, -122.1419);
        final LatLng end = LatLng.newInstance(37.45, -122.15);

        final MapWidget m = new MapWidget(start, 13);

        // Apparently, setting the size is important for the move event.
        m.setSize("300px", "300px");
View Full Code Here

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

  }

  public void testMapMoveEvent() {
    loadApi(new Runnable() {
      public void run() {
        final LatLng start = LatLng.newInstance(37.4419, -122.1419);
        final LatLng end = LatLng.newInstance(37.4569, -122.1569);

        final MapWidget m = new MapWidget(start, 13);

        /*
         * The Move event gets called on setCenter(). There is a setCenter()
View Full Code Here

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

   * Creates a 300x300 pixel map centered on Atlanta and adds it to the page.
   *
   * @return the created MapWidget instance.
   */
  protected MapWidget addDefaultMap() {
    LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
    MapWidget map = new MapWidget(atlanta, 8);
    map.setSize("300px", "300px");
    RootPanel.get().add(map);
    return map;
  }
View Full Code Here

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

  public void testPolylineOptions() {
    loadApi(new Runnable() {
      public void run() {
        MapWidget map = new MapWidget(LatLng.newInstance(0, 0), 3);
        map.setSize("500px", "400px");
        LatLng nycToZurich[] = {LatLng.newInstance(40.75, -73.90), // New York
            LatLng.newInstance(47.3, 8.5) // Zurich
        };
        map.setCenter(LatLng.newInstance(40, -25), 2);
        Polyline pline = new Polyline(nycToZurich, "#FF0000", 1, .75,
            PolylineOptions.newInstance(false, true));
View Full Code Here

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

  public void testPolylineOptions2() {
    loadApi(new Runnable() {
      public void run() {
        MapWidget map = new MapWidget(LatLng.newInstance(0, 0), 3);
        map.setSize("500px", "400px");
        LatLng nycToZurich[] = {LatLng.newInstance(40.75, -73.90), // New York
            LatLng.newInstance(47.3, 8.5) // Zurich
        };
        map.setCenter(LatLng.newInstance(40, -25), 2);
        Polyline pline = new Polyline(nycToZurich, "#FF0000", 1, .75,
            PolylineOptions.newInstance(false));
View Full Code Here

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

  }

  public void testOverlayZIndex() {
    loadApi(new Runnable() {
      public void run() {
        LatLng atlanta = LatLng.newInstance(33.7814790, -84.3880580);
        double result1 = Overlay.getZIndex(atlanta.getLatitude());
        assertTrue("expected non-zero value", result1 != 0.0);
        double result2 = Overlay.getZIndex(atlanta.getLatitude() + 1);
        assertTrue("expected non-zero value", result2 != 0.0);
        assertTrue("expected result1 > result2 ", result1 > result2);
      }
    });
  }
View Full Code Here

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

    map = new MapWidget(tenthStreet, 16);
    map.setSize("500px", "300px");
    map.addMapClickHandler(new MapClickHandler() {
      public void onClick(MapClickEvent event) {
        LatLng point = event.getLatLng() == null ? event.getOverlayLatLng()
            : event.getLatLng();
        if (point != null) {
          svClient.getNearestPanoramaLatLng(point,
              new LatLngStreetviewCallback() {
                @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.