Package com.google.gwt.maps.client

Examples of com.google.gwt.maps.client.InfoWindow


        RootPanel.get().add(map);

        final Marker marker = new Marker(atlanta);
        map.addOverlay(marker);
        final InfoWindow info = map.getInfoWindow();
        marker.addMarkerInfoWindowOpenHandler(new MarkerInfoWindowOpenHandler() {

          public void onInfoWindowOpen(MarkerInfoWindowOpenEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }

        });
        info.open(marker, new InfoWindowContent("Hello World!"));
      }
    }, false);
  }
View Full Code Here


      final LocationHandler deleteHandler) {
    this(false);
    this.deleteHandler = deleteHandler;
    map.addMapDoubleClickHandler(new MapDoubleClickHandler() {
      public void onDoubleClick(MapDoubleClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        info.open(event.getLatLng(), newLocationCreateForm(event.getLatLng(),
            createHandler, info));
      }
    });
  }
View Full Code Here

  private Marker createMarker(final Location loc) {
    LatLng latlng = LatLng.newInstance(loc.getLatitude(), loc.getLongitude());
    final Marker marker = new Marker(latlng);
    marker.addMarkerClickHandler(new MarkerClickHandler() {
      public void onClick(MarkerClickEvent event) {
        final InfoWindow info = map.getInfoWindow();
        info.open(marker, newLocationDescription(loc, info, marker));
      }
    });
    return marker;
  }
View Full Code Here

        @Override
        public void onMouseOver(MarkerMouseOverEvent event) {

          InfoWindowContent iwc = new InfoWindowContent(temp);
          InfoWindow info = map.getInfoWindow();
          info.open(event.getSender(), iwc);
        }
      });
    }
    marker = new Marker(searchLL);
    map.addOverlay(marker);
View Full Code Here

      map.addOverlay(marker);
      final InfoWindowContent iwc = new InfoWindowContent(description);
      marker.addMarkerClickHandler(new MarkerClickHandler() {
        @Override
        public void onClick(MarkerClickEvent event) {
          InfoWindow infoWindow = map.getInfoWindow();
          if (infoWindow.isVisible()) {
            infoWindow.close();
          } else {
            infoWindow.open(marker, iwc);
          }
        }
      });
      map.setTitle(description);
    }
View Full Code Here

        Marker marker = new Marker(point);
        marker.addMarkerClickHandler(new MarkerClickHandler() {
          @Override
          public void onClick(MarkerClickEvent event) {
            InfoWindow window = _map.getInfoWindow();
            DivPanel panel = new DivPanel();

            DivPanel rowA = new DivPanel(_css.paragraph());
            panel.add(rowA);
            rowA.add(new Anchor(agency.getName(), agency.getUrl()));

            DivPanel rowB = new DivPanel(_css.paragraph());
            panel.add(rowB);
            rowB.add(new Anchor("jump to map", "index.html#m(location)lat("
                + point.getLatitude() + ")lon(" + point.getLongitude()
                + ")accuracy(4)"));
            window.open(point, new InfoWindowContent(panel));
          }
        });

        _map.addOverlay(marker);
      }
View Full Code Here

    @Override
    public void onPlaceClicked(final Place place) {

      LatLng p = place.getLocation();
      MapWidget _map = _transitMapManager.getMap();
      InfoWindow window = _map.getInfoWindow();

      FlowPanel panel = new FlowPanel();
      panel.add(new DivWidget(place.getName()));
      String desc = place.getDescriptionAsString();
      if (desc.length() > 0)
        panel.add(new DivWidget(desc));

      DivPanel row = new DivPanel();
      panel.add(row);

      Anchor anchor = new Anchor("Show nearby transit stops");
      row.add(anchor);

      anchor.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent arg0) {
          _transitMapManager.showPlace(place, true,
              ShowPlacesOnMapToggleHandler.this);
        }
      });

      window.open(p, new InfoWindowContent(panel));
    }
View Full Code Here

    _transitMapManager.addStopClickedHandler(new StopClickedHandler() {
      @Override
      public void handleStopClicked(StopClickedEvent event) {
        StopBean stop = event.getStop();
        InfoWindow window = _map.getInfoWindow();
        LatLng point = LatLng.newInstance(stop.getLat(), stop.getLon());
        Widget widget = getStopInfoWindowWidget(stop,style);
        window.open(point, new InfoWindowContent(widget));
      }
    });
  }
View Full Code Here

            panel.add(new DivWidget("Route: " + route.getShortName()));
            panel.add(new DivWidget("Trip: " + trip.getId()));
            panel.add(new DivWidget("Destination: "
                + bean.getTrip().getTripHeadsign()));

            InfoWindow window = _map.getInfoWindow();
            window.open(point, new InfoWindowContent(panel));
          }
        });

      }
    }
View Full Code Here

    panel.add(new DivWidget(stop.getName()));
    panel.add(new DivWidget("Stop # " + stop.getId()));
    panel.add(new DivWidget("Travel Time: " + (_bean.getTime() / 60) + " mins"));

    MapWidget map = _mapManager.getMapWidget();
    InfoWindow window = map.getInfoWindow();
    window.open(_point, new InfoWindowContent(panel));
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.InfoWindow

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.