Package com.google.gwt.maps.client.overlay

Examples of com.google.gwt.maps.client.overlay.MarkerOptions


    LatLngBounds bounds = map.getBounds();
    LatLng southWest = bounds.getSouthWest();
    LatLng northEast = bounds.getNorthEast();
    double lngSpan = northEast.getLongitude() - southWest.getLongitude();
    double latSpan = northEast.getLatitude() - southWest.getLatitude();
    MarkerOptions options = MarkerOptions.newInstance();
    options.setIcon(icon);
    for (int i = 0; i < 10; i++) {
      LatLng point = LatLng.newInstance(southWest.getLatitude() + latSpan
          * Math.random(), southWest.getLongitude() + lngSpan * Math.random());

      map.addOverlay(new Marker(point, options));
View Full Code Here


    // Center the new map on Midtown Atlanta
    map = new MapWidget(ATLANTA, 13);
    map.setSize("500px", "300px");
    map.setUIToDefault();

    MarkerOptions opt = MarkerOptions.newInstance();
    opt.setDraggable(true);
    marker = new Marker(ATLANTA, opt);

    Panel hp1 = createActionButtons();

    HorizontalPanel hp2 = createListenerListBox();
View Full Code Here

  private Marker createMarker(LatLng point, int index) {
    // Create a lettered icon for this point using our icon class
    final char letter = (char) ('A' + index);
    Icon icon = Icon.newInstance(baseIcon);
    icon.setImageURL("http://www.google.com/mapfiles/marker" + letter + ".png");
    MarkerOptions options = MarkerOptions.newInstance();
    options.setIcon(icon);
    final Marker marker = new Marker(point, options);

    marker.addMarkerClickHandler(new MarkerClickHandler() {

      public void onClick(MarkerClickEvent event) {
View Full Code Here

  @Override
  public void onShow() {
    map.clearOverlays();

    MarkerOptions options = MarkerOptions.newInstance();
    options.setDraggable(true);
    final Marker marker = new Marker(map.getCenter(), options);
    final InfoWindow info = map.getInfoWindow();
   
    marker.addMarkerDragEndHandler(new MarkerDragEndHandler() {
      public void onDragEnd(MarkerDragEndEvent event) {
View Full Code Here

      log(1, "Icon URL '" + jsIcon.stringValue() + "' at anchor point ("
          + iconAnchorX + "," + iconAnchorY + ")");
    }

    MarkerOptions mopts;
    if (icon != null) {
      mopts = MarkerOptions.newInstance(icon);
    } else {
      mopts = MarkerOptions.newInstance();
    }

    mopts.setTitle(jsTitle.stringValue());
    mopts.setDraggable(jsDraggable.booleanValue());

    final double lat = jsLat.doubleValue();
    final double lng = jsLng.doubleValue();

    if (lat < -90 || lat > 90) {
View Full Code Here

    ImageResource resource = getMarkerResource(index);
    Icon icon = Icon.newInstance(resource.getURL());
    icon.setIconSize(Size.newInstance(24, 31));
    icon.setIconAnchor(Point.newInstance(12, 31));
    MarkerOptions opts = MarkerOptions.newInstance();
    opts.setClickable(true);
    opts.setIcon(icon);
    LatLng point = LatLng.newInstance(entry.getLat(), entry.getLon());
    return new Marker(point, opts);
  }
View Full Code Here

      DataResource resource = resources.getImageRouteStart();
      Icon icon = Icon.newInstance();
      icon.setImageURL(resource.getUrl());
      icon.setIconSize(Size.newInstance(20, 34));
      icon.setIconAnchor(Point.newInstance(10, 34));
      MarkerOptions opts = MarkerOptions.newInstance(icon);

      _marker = new Marker(location, opts);
      _mapOverlayManager.addOverlay(_marker);
    }
View Full Code Here

    icon.setIconSize(Size.newInstance(w, h));
    icon.setIconAnchor(Point.newInstance(w2, h2));
    icon.setInfoWindowAnchor(Point.newInstance(w2, h2));

    MarkerOptions options = MarkerOptions.newInstance(icon);
    return new Marker(p, options);
  }
View Full Code Here

    return clickHandler;
  }

  private Marker getStopMarker(final StopBean stop, final LatLng p, ESize size) {

    MarkerOptions opts = MarkerOptions.newInstance();
    boolean isSelected = false;

    Icon icon = StopIconFactory.getStopIcon(stop, size, isSelected);
    opts.setIcon(icon);
    return new Marker(p, opts);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.maps.client.overlay.MarkerOptions

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.