Examples of LatLng


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

    }
    super.gwtTearDown();
  }

  private StreetviewPanoramaWidget newDefaultPanorama() {
    LatLng tenthStreet = LatLng.newInstance(33.7814839, -84.3879353);
    StreetviewPanoramaOptions options = StreetviewPanoramaOptions.newInstance();
    options.setLatLng(tenthStreet);
    StreetviewPanoramaWidget panorama = new StreetviewPanoramaWidget(options);
    panorama.setSize("500px", "300px");
    return panorama;
View Full Code Here

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

        String description = "Googleplex";
        setProperty(location, "description", description);
        assertEquals(description, location.getDescription());

        LatLng ll = LatLng.newInstance(1, -1);
        setProperty(location, "latlng", ll);
        assertSame(ll, location.getLatLng());

        String panoId = "7";
        setProperty(location, "panoId", panoId);
View Full Code Here

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

      public void run() {
        final MapWidget m = new MapWidget();
        m.addMapClickHandler(new MapClickHandler() {
          public void onClick(MapClickEvent event) {
            Overlay o = event.getOverlay();
            LatLng p = event.getLatLng();
            assertEquals(event.getSender(), m);
            assertNotNull("maker is null", o);
            Marker marker = (Marker) o;
            assertTrue(marker.getLatLng().getLatitude() == 12.34);
            assertTrue(marker.getLatLng().getLongitude() == -22.2);
            assertNotNull("point is null", p);
            assertTrue(p.getLatitude() == 10.1);
            assertTrue(p.getLongitude() == 12.2);
            LatLng overlaylatlng = event.getOverlayLatLng();
            assertNotNull("overlaylatlng is null", overlaylatlng);
            assertEquals("Latitude didn't match for overlaylatlng", 1.0,
                overlaylatlng.getLatitude(), .001);
            assertEquals("Longitude didn't match for overlaylatlng", 2.0,
                overlaylatlng.getLongitude(), .001);
            finishTest();
          }
        });
        RootPanel.get().add(m);
        Marker marker = new Marker(LatLng.newInstance(12.34, -22.2));
View Full Code Here

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

    if (isFirefoxOnWindows()) {
      return;
    }
    loadApi(new Runnable() {
      public void run() {
        final LatLng mountEverest = LatLng.newInstance(27.988056, 86.925278);
        StreetviewPanoramaOptions options = StreetviewPanoramaOptions.newInstance();
        options.setLatLng(mountEverest);

        panorama = new StreetviewPanoramaWidget(options);
        panorama.setSize("500px", "300px");
View Full Code Here

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

    if (isFirefoxOnWindows()) {
      return;
    }
    loadApi(new Runnable() {
      public void run() {
        final LatLng tenthStreet = LatLng.newInstance(33.7814839, -84.3879353);
        final Pov pov = Pov.newInstance();
        pov.setPitch(-5).setYaw(180).setZoom(1);

        StreetviewPanoramaOptions options = StreetviewPanoramaOptions.newInstance();
        options.setLatLng(tenthStreet);
        options.setPov(pov);

        panorama = new StreetviewPanoramaWidget(options);
        panorama.setSize("500px", "300px");

        panorama.addInitializedHandler(new StreetviewInitializedHandler() {
          public void onInitialized(StreetviewInitializedEvent event) {
            LatLng point = event.getLocation().getLatLng();
            assertEquals(tenthStreet.getLatitude(), point.getLatitude(), 1e-2);
            assertEquals(tenthStreet.getLongitude(), point.getLongitude(), 1e-2);

            Pov actualPov = event.getLocation().getPov();
            assertEquals(pov.getPitch(), actualPov.getPitch(), 1e-2);
            assertEquals(pov.getYaw(), actualPov.getYaw(), 1e-2);
            // Intentionally not testing zoom, as it behaves unpredictably
View Full Code Here

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

        m.addMapDoubleClickHandler(new MapDoubleClickHandler() {

          public void onDoubleClick(MapDoubleClickEvent event) {
            assertEquals(event.getSender(), m);
            LatLng p = event.getLatLng();
            assertNotNull("point is null", p);
            assertTrue(p.getLatitude() == 10.1);
            assertTrue(p.getLongitude() == 12.2);
            finishTest();
          }

        });
        RootPanel.get().add(m);
View Full Code Here

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

    if (isFirefoxOnWindows()) {
      return;
    }
    loadApi(new Runnable() {
      public void run() {
        final LatLng tenthStreet = LatLng.newInstance(33.7814839, -84.3879353);
        final LatLng manhattan = LatLng.newInstance(40.728333, -73.994167);
        panorama = newDefaultPanorama();

        panorama.addInitializedHandler(new StreetviewInitializedHandler() {
          public void onInitialized(StreetviewInitializedEvent event) {
            LatLng point = event.getLocation().getLatLng();

            // If on tenth street in Atlanta
            if (Math.abs(tenthStreet.getLatitude() - point.getLatitude()) < 1e-2
                && Math.abs(tenthStreet.getLongitude() - point.getLongitude()) < 1e-2) {
              // Event triggered when panorama was initialized first time
              panorama.setLocationAndPov(manhattan, Pov.newInstance());
            } else {
              // Event triggered when panorama was initialized again after
              // setLocationAndPov() was invoked
              assertEquals(manhattan.getLatitude(), point.getLatitude(), 1e-2);
              assertEquals(manhattan.getLongitude(), point.getLongitude(), 1e-2);
              finishTest();
            }
          }
        });
View Full Code Here

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

    }
    super.gwtTearDown();
  }

  private StreetviewPanoramaWidget newDefaultPanorama() {
    LatLng tenthStreet = LatLng.newInstance(33.7814839, -84.3879353);
    StreetviewPanoramaOptions options = StreetviewPanoramaOptions.newInstance();
    options.setLatLng(tenthStreet);
    StreetviewPanoramaWidget panorama = new StreetviewPanoramaWidget(options);
    panorama.setSize("500px", "300px");
    return panorama;
View Full Code Here

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

  public void testMapMouseMoveTrigger() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();

        final LatLng latlng = LatLng.newInstance(1.0, 2.0);

        m.addMapMouseMoveHandler(new MapMouseMoveHandler() {

          public void onMouseMove(MapMouseMoveEvent event) {
            assertEquals(event.getSender(), m);
View Full Code Here

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

   */
  public void testMapMouseOutTrigger() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final LatLng latlng = LatLng.newInstance(1.0, 2.0);

        m.addMapMouseOutHandler(new MapMouseOutHandler() {

          public void onMouseOut(MapMouseOutEvent event) {

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.