Package com.google.gwt.maps.client

Examples of com.google.gwt.maps.client.InfoWindowContent$MapBlowupContent


        final Marker marker = new Marker(point);
        marker.addMarkerClickListener(new MarkerClickListener() {
            public void onClick(Marker sender) {
                InfoWindow info = map.getInfoWindow();
                info.open(sender, new InfoWindowContent(new SchoolLink(
                        school)));
            }

            public void onDoubleClick(Marker sender) {
            }
View Full Code Here


   
    marker.addMarkerClickHandler(new MarkerClickHandler() {
      public void onClick(MarkerClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        info.open(marker,
            new InfoWindowContent("Marker #<b>" + number + "</b>"));
      }
    });
   
    return marker;
  }
View Full Code Here

    final Button infoWindowButton = new Button("Show InfoWindow");
    infoWindowButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        InfoWindowContent content = new InfoWindowContent("Hello Maps!");
        content.setMaxContent("Hello Maps - more content");
        content.setMaxTitle("Hello Maps");
        info.open(map.getCenter(), content);
      }
    });
    hp.add(infoWindowButton);

    final Button mInfoWindowButton = new Button("Marker InfoWindow");
    mInfoWindowButton.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        InfoWindowContent content = new InfoWindowContent("Hello Maps!");
        content.setMaxContent("Hello Maps - more content");
        content.setMaxTitle("Hello Maps");
        info.open(marker, content);
      }
    });
    hp.add(mInfoWindowButton);
View Full Code Here

    if (selection == null) {
      return;
    }

    InfoWindowContent content;

    if (selection.equals(TEST_MAX_CONTENT)) {

      // Demonstrate the use of the maxTitle and maxContent properties
      HTML htmlWidget = new HTML("<h1>ATTENTION PLEASE</h1>"
          + "<p> I have a few things to say to you (click maximize.)</p>");
      content = new InfoWindowContent(htmlWidget);
      content.setMaxContent("<p>Lorem ipsum dolor sit amet, consetetur "
      + "sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut "
      + "labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos "
      + "et accusam et justo duo dolores et ea rebum. Stet clita kasd "
      + "gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. "
      + "Lorem ipsum dolor sit amet, consetetur sadipscing elitr,  sed diam "
      + "nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam "
      + "erat, sed diam voluptua. At vero eos et accusam et justo duo dolores "
      + "et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est "
      + "Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur "
      + "sadipscing elitr,  sed diam nonumy eirmod tempor invidunt ut labore "
      + "et dolore magna aliquyam erat, sed diam voluptua. At vero eos et "
      + "accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, "
      + "no sea takimata sanctus est Lorem ipsum dolor sit amet.</p>"
      + "<p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit "
      + "esse molestie consequat, vel illum dolore eu feugiat nulla facilisis "
      + "at vero eros et accumsan et iusto odio dignissim qui blandit "
      + "praesent luptatum zzril delenit augue duis dolore te feugait nulla "
      + "facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, "
      + "sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna "
      + "aliquam erat volutpat.</p>");

      content.setMaxTitle("Lorem Ipsum");

    } else if (selection.equals(TEST_IMAGE)) {

      // An image that isn't loaded yet doesn't work well sometimes
      // Specify the width and height to work around this.
      HTML htmlWidget = new HTML(
          "<img src=\"boot.jpg\" width=\"235\" height=\"287\">");
      content = new InfoWindowContent(htmlWidget);
    } else if (selection.equals(TEST_NO_CLICK)) {

      // Demonstrates setting the info window to stay "sticky" and not
      // automatically close when the user clicks on the maps window.
      HTML htmlWidget = new HTML("<h1>STICKY INFO WINDOW</h1>"
          + "<p> Click if you must, you won't get rid of me that easily.</p>");
      content = new InfoWindowContent(htmlWidget);
      content.setNoCloseOnClick(true);
    } else if (selection.equals(TEST_TABS)) {

      // Display tabs in the InfoWindow
      content = displayInfoWindowTabs();
    } else if (selection.equals(TEST_MAX_TITLE_CONTENT_WIDGET)) {

      // Display the maximized content using widgets instead of strings.
      content = displayInfoWindowMaxWidget();
    } else if (selection.equals(TEST_MAP_BLOWUP)) {

      // Display a Map Blowup Window
      content = new InfoWindowContent.MapBlowupContent();
    } else {

      // The default case
      Tree tree = new Tree();
      TreeItem foo = new TreeItem("Foo");
      tree.addItem(foo);
      TreeItem bar = new TreeItem("bar");
      foo.addItem(bar);
      bar.addItem("baz");
      bar.addItem("gwt");
      // max-height must be set in advance so info window is sized appropriately
      tree.setSize("217px", "104px");
      content = new InfoWindowContent(tree);
    }

    info.open(map.getCenter(), content);
  }
View Full Code Here

    info.open(map.getCenter(), content);
  }

  private InfoWindowContent displayInfoWindowMaxWidget() {
    final InfoWindowContent content = new InfoWindowContent(
        "There's more to see (hit the maximize button)");
    content.setMaxTitle(new HTML("<i>Maximized Italic Boots</i>"));
    VerticalPanel panel = new VerticalPanel();
    panel.add(new Image("boot.jpg"));
    Button b = new Button("Click for Message");
    final Label l = new Label();
    HorizontalPanel hp = new HorizontalPanel();
    hp.add(b);
    hp.add(l);
    l.getElement().getStyle().setPropertyPx("margin", 7);
    b.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        GWT.log("Got click in maximized window.", null);
        if (l.getText().equals("")) {
          l.setText("Hello World!");
        } else {
          l.setText("");
        }
      }
    });
    panel.add(hp);
    panel.setSpacing(10);
    content.setMaxContent(panel);
    return content;
  }
View Full Code Here

    InfoWindowTab tabs[] = new InfoWindowTab[2];

    tabs[0] = new InfoWindowTab("Tab 1", "<h1>Tab 1 Content</h1>");
    tabs[1] = new InfoWindowTab("Tab 2", "<h1>Tab 2 Content</h1>");
    final InfoWindowContent content = new InfoWindowContent(tabs, 1);
    return content;
  }
View Full Code Here

        final MapWidget map = new MapWidget(center, 1);
        map.setSize("300px", "300px");
        final Marker m = new Marker(center);
        map.addOverlay(m);
        RootPanel.get().add(map);
        InfoWindowContent content = new InfoWindowContent("<i>Hello World!</i>");
        InfoWindow info = map.getInfoWindow();
        info.open(m, content);
        DeferredCommand.addCommand(new Command() {

          public void execute() {
View Full Code Here

    marker.addMarkerClickHandler(new MarkerClickHandler() {

      public void onClick(MarkerClickEvent event) {
        InfoWindow info = map.getInfoWindow();
        info.open(event.getSender(), new InfoWindowContent("Marker <b>"
            + letter + "</b>"));
      }

    });
View Full Code Here

      public void onSuccess(LatLng point) {
        map.setCenter(point, 13);
        Marker marker = new Marker(point);
        map.addOverlay(marker);
        info.open(marker, new InfoWindowContent(address));
        displayLatLng(point);
      }
    });
  }
View Full Code Here

    final Marker marker = new Marker(map.getCenter(), options);
    final InfoWindow info = map.getInfoWindow();
   
    marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
      public void onDragEnd(MarkerDragEndEvent event) {
          info.open(marker, new InfoWindowContent("Just bouncing along..."));
        }
     
    });
   
    marker.addMarkerDragStartHandler(new MarkerDragStartHandler() {
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.InfoWindowContent$MapBlowupContent

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.