Package com.google.gwt.maps.client

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


        Placemark place = locations.get(0);
        Marker marker = new Marker(place.getPoint());
        map.addOverlay(marker);
        String message = place.getAddress() + "<br>" + "<b>Country code:</b> "
            + place.getCountry();
        info.open(marker, new InfoWindowContent(message));
      }
    });
  }
View Full Code Here


        if (event.getOverlay() != null) {
          return;
        }
        final Marker marker = new Marker(event.getLatLng());
        final VerticalPanel panel = new VerticalPanel();
        final InfoWindowContent content = new InfoWindowContent(panel);
        panel.add(new Label("LatLng: " + event.getLatLng().toString()));

        // Do a reverse geocode of this position
        geocoder.getLocations(event.getLatLng(), new LocationCallback() {
View Full Code Here

            });
          }
        });

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

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

            assertEquals(event.getSender(), marker);
            finishTest();
          }

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

          // Only one component in the info window -> no tabbing
          UIDL paintableUIDL = u.getChildUIDL(0).getChildUIDL(0);
          Paintable paintable = client.getPaintable(paintableUIDL);

          map.getInfoWindow().open(marker.getLatLng(),
              new InfoWindowContent((Widget) paintable));

          // Update components in the info window after adding them to
          // DOM so that size calculations can succeed
          paintable.updateFromUIDL(paintableUIDL, client);
        } else {
          int tabs = u.getChildCount();
          // More than one component, show them in info window tabs
          InfoWindowContent.InfoWindowTab[] infoTabs = new InfoWindowContent.InfoWindowTab[tabs];

          Paintable[] paintables = new Paintable[tabs];
          UIDL[] uidls = new UIDL[tabs];

          int selectedId = 0;
          for (int i = 0; i < u.getChildCount(); i++) {
            UIDL childUIDL = u.getChildUIDL(i);
            if (selectedId == 0
                && childUIDL.getBooleanAttribute("selected")) {
              selectedId = i;
            }

            String label = childUIDL.getStringAttribute("label");

            UIDL paintableUIDL = childUIDL.getChildUIDL(0);
            Paintable paintable = client
                .getPaintable(paintableUIDL);

            paintables[i] = paintable;
            uidls[i] = paintableUIDL;

            infoTabs[i] = new InfoWindowContent.InfoWindowTab(
                label, (Widget) paintable);
          }

          map.getInfoWindow().open(marker.getLatLng(),
              new InfoWindowContent(infoTabs, selectedId));

          // Update paintables after adding them to DOM so that
          // size calculations can succeed
          for (int i = 0; i < paintables.length; i++) {
            paintables[i].updateFromUIDL(uidls[i], client);
View Full Code Here

      // Add a marker
      map.addOverlay(new Marker(cmu_information_systems));

      // Add an info window to highlight a point of interest
      map.getInfoWindow().open(map.getCenter(),
          new InfoWindowContent("Porter Hall 222, CMU Information Systems"));
      view.getContent().setWidget(null); // clearing the current child widget. probalby not the way to go though...
    view.getContent().add(map.asWidget());
  }
View Full Code Here

    panel.add(new HTML("description"));
    panel.add(descriptionBox);
    panel.add(saveButton);
    panel.setCellHorizontalAlignment(saveButton,
        HasHorizontalAlignment.ALIGN_RIGHT);
    return new InfoWindowContent(panel);
  }
View Full Code Here

      });
      panel.add(deleteButton);
      panel.setCellHorizontalAlignment(deleteButton,
          HasHorizontalAlignment.ALIGN_RIGHT);
    }
    return new InfoWindowContent(panel);
  }
View Full Code Here

      partMarker.addMarkerMouseOverHandler(new MarkerMouseOverHandler() {

        @Override
        public void onMouseOver(MarkerMouseOverEvent event) {

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

TOP

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

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.