public Builder<T> infoWindowAnchor(float u, float v) { markerOptions.infoWindowAnchor(u, v); return this; }
/** * Sets the info window anchor U and V coordinates of the GeoJsonPoint. This is specified in * the same coordinate system as the anchor. The U & V values are the same U & V values * used in * {@link com.google.android.gms.maps.model.MarkerOptions#infoWindowAnchor(float, float)}. * * @param infoWindowAnchorU info window anchor U coordinate of the GeoJsonPoint * @param infoWindowAnchorV info window anchor V coordinate of the GeoJsonPoint */ public void setInfoWindowAnchor(float infoWindowAnchorU, float infoWindowAnchorV) { mMarkerOptions.infoWindowAnchor(infoWindowAnchorU, infoWindowAnchorV); styleChanged(); }
/** * Gets a new MarkerOptions object containing styles for the GeoJsonPoint * * @return new MarkerOptions object */ public MarkerOptions toMarkerOptions() { MarkerOptions markerOptions = new MarkerOptions(); markerOptions.alpha(mMarkerOptions.getAlpha()); markerOptions.anchor(mMarkerOptions.getAnchorU(), mMarkerOptions.getAnchorV()); markerOptions.draggable(mMarkerOptions.isDraggable()); markerOptions.flat(mMarkerOptions.isFlat()); markerOptions.icon(mMarkerOptions.getIcon()); markerOptions.infoWindowAnchor(mMarkerOptions.getInfoWindowAnchorU(), mMarkerOptions.getInfoWindowAnchorV()); markerOptions.rotation(mMarkerOptions.getRotation()); markerOptions.snippet(mMarkerOptions.getSnippet()); markerOptions.title(mMarkerOptions.getTitle()); markerOptions.visible(mMarkerOptions.isVisible()); markerOptions.zIndex(mMarkerOptions.getZIndex()); return markerOptions; }
public MarkerOptions infoWindowAnchor(float u, float v) { real.infoWindowAnchor(u, v); return this; }
public void setInfoWindowAnchor(float anchorU, float anchorV) { if (marker != null) { marker.setInfoWindowAnchor(anchorU, anchorV); } else { markerOptions.infoWindowAnchor(anchorU, anchorV); } }
/** * Sets the info window anchor U and V coordinates of the GeoJsonPoint. This is specified in * the same coordinate system as the anchor. The U & V values are the same U & V values * used in * {@link com.google.android.gms.maps.model.MarkerOptions#infoWindowAnchor(float, float)}. * * @param infoWindowAnchorU info window anchor U coordinate of the GeoJsonPoint * @param infoWindowAnchorV info window anchor V coordinate of the GeoJsonPoint */ public void setInfoWindowAnchor(float infoWindowAnchorU, float infoWindowAnchorV) { mMarkerOptions.infoWindowAnchor(infoWindowAnchorU, infoWindowAnchorV); styleChanged(); }
.snippet("Population: 4,627,300") .icon(BitmapDescriptorFactory.fromResource(R.drawable.arrow)) .infoWindowAnchor(0.5f, 0.5f));
com.google.android.gms.maps.model.Marker createMarker(List<Marker> markers, LatLng position) { markerOptions.position(position); ClusterOptions opts = clusterOptionsProvider.getClusterOptions(markers); markerOptions.icon(opts.getIcon()); if (GOOGLE_PLAY_SERVICES_4_0) { try { markerOptions.alpha(opts.getAlpha()); } catch (NoSuchMethodError error) { // not the cutest way to handle backward compatibility GOOGLE_PLAY_SERVICES_4_0 = false; } } markerOptions.anchor(opts.getAnchorU(), opts.getAnchorV()); markerOptions.flat(opts.isFlat()); markerOptions.infoWindowAnchor(opts.getInfoWindowAnchorU(), opts.getInfoWindowAnchorV()); markerOptions.rotation(opts.getRotation()); if (GOOGLE_PLAY_SERVICES_9_2) { try { markerOptions.zIndex(opts.getZIndex()); } catch (NoSuchMethodError error) { GOOGLE_PLAY_SERVICES_9_2 = false; } } return map.addMarker(markerOptions); }
/** * Gets a new MarkerOptions object containing styles for the GeoJsonPoint * * @return new MarkerOptions object */ public MarkerOptions toMarkerOptions() { MarkerOptions markerOptions = new MarkerOptions(); markerOptions.alpha(mMarkerOptions.getAlpha()); markerOptions.anchor(mMarkerOptions.getAnchorU(), mMarkerOptions.getAnchorV()); markerOptions.draggable(mMarkerOptions.isDraggable()); markerOptions.flat(mMarkerOptions.isFlat()); markerOptions.icon(mMarkerOptions.getIcon()); markerOptions.infoWindowAnchor(mMarkerOptions.getInfoWindowAnchorU(), mMarkerOptions.getInfoWindowAnchorV()); markerOptions.rotation(mMarkerOptions.getRotation()); markerOptions.snippet(mMarkerOptions.getSnippet()); markerOptions.title(mMarkerOptions.getTitle()); markerOptions.visible(mMarkerOptions.isVisible()); return markerOptions; }
private static MarkerOptions copy(MarkerOptions options) { MarkerOptions copy = new MarkerOptions(); if (GOOGLE_PLAY_SERVICES_4_0) { try { copy.alpha(options.getAlpha()); } catch (NoSuchMethodError error) { // not the cutest way to handle backward compatibility GOOGLE_PLAY_SERVICES_4_0 = false; } } copy.anchor(options.getAnchorU(), options.getAnchorV()); copy.draggable(options.isDraggable()); copy.flat(options.isFlat()); copy.icon(options.getIcon()); copy.infoWindowAnchor(options.getInfoWindowAnchorU(), options.getInfoWindowAnchorV()); copy.position(options.getPosition()); copy.rotation(options.getRotation()); copy.snippet(options.getSnippet()); copy.title(options.getTitle()); copy.visible(options.isVisible()); if (GOOGLE_PLAY_SERVICES_9_2) { try { copy.zIndex(options.getZIndex()); } catch (NoSuchMethodError error) { GOOGLE_PLAY_SERVICES_9_2 = false; } } return copy; } }