Package com.google.gwt.maps.client

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


   * Test the "lineupdated" event using a trigger.
   */
  public void testPolylineLineUpdatedTrigger() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final Polyline polyline = setupPolyline(m);

        m.addOverlay(polyline);
        polyline.setEditingEnabled(true);
        polyline.addPolylineLineUpdatedHandler(new PolylineLineUpdatedHandler() {

          public void onUpdate(PolylineLineUpdatedEvent event) {
            finishTest();
View Full Code Here


   * Test the "mouseout" event using a trigger.
   */
  public void testPolylineMouseOut() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final Polyline polyline = setupPolyline(m);
        m.addOverlay(polyline);
        polyline.addPolylineMouseOutHandler(new PolylineMouseOutHandler() {

          public void onMouseOut(PolylineMouseOutEvent event) {
            finishTest();
          }
View Full Code Here

   * Test the "mouseover" event using a trigger.
   */
  public void testPolylineMouseOver() {
    loadApi(new Runnable() {
      public void run() {
        final MapWidget m = new MapWidget();
        final Polyline polyline = setupPolyline(m);
        m.addOverlay(polyline);
        polyline.addPolylineMouseOverHandler(new PolylineMouseOverHandler() {

          public void onMouseOver(PolylineMouseOverEvent event) {
            finishTest();
          }
View Full Code Here

  }

  private MapWidget map;

  public ControlsDemo() {
    map = new MapWidget(LatLng.newInstance(37.4419, -122.1419), 13);
    map.setSize("500px", "300px");
    initWidget(map);
    map.addControl(new SmallMapControl());
    map.addControl(new MapTypeControl());
View Full Code Here

    horizPanel.add(new Label("Choose Action:"));
    horizPanel.add(actionListBox);
    horizPanel.setSpacing(10);
    vertPanel.add(horizPanel);

    map = new MapWidget(LatLng.newInstance(37.441944, -122.141944), 13);
    map.setSize("500px", "300px");
    map.addMapType(MapType.getNormalMap());
    map.addMapType(MapType.getSatelliteMap());
    map.addMapType(MapType.getMarsVisibleMap());
    map.addMapType(MapType.getMarsElevationMap());
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);
        map.addOverlay(marker);

        marker.addMarkerClickHandler(new MarkerClickHandler() {

          public void onClick(MarkerClickEvent event) {
            assertEquals(event.getSender(), marker);
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);
        map.addOverlay(marker);
        marker.addMarkerDoubleClickHandler(new MarkerDoubleClickHandler() {
          public void onDoubleClick(MarkerDoubleClickEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
View Full Code Here

  public void testMarkerDragEndTrigger() {
    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);
        map.addOverlay(marker);
        marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
          public void onDragEnd(MarkerDragEndEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
View Full Code Here

  public void testMarkerDragStartTrigger() {
    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);
        map.addOverlay(marker);
        marker.addMarkerDragStartHandler(new MarkerDragStartHandler() {
          public void onDragStart(MarkerDragStartEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
View Full Code Here

  public void testMarkerDragTrigger() {
    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);
        map.addOverlay(marker);
        marker.addMarkerDragHandler(new MarkerDragHandler() {
          public void onDrag(MarkerDragEvent event) {
            assertEquals(event.getSender(), marker);
            finishTest();
          }
View Full Code Here

TOP

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

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.