/** * Gets the info window anchor U coordinate of the GeoJsonPoint. Normalized to [0, 1], of the * info window anchor from the left edge. This is equivalent to the same U value used in {@link * com.google.android.gms.maps.model.MarkerOptions#getInfoWindowAnchorU()}. * * @return info window anchor U coordinate of the GeoJsonPoint */ public float getInfoWindowAnchorU() { return mMarkerOptions.getInfoWindowAnchorU(); }
public void testInfoWindowAnchor() throws Exception { pointStyle.setInfoWindowAnchor(0.12f, 0.98f); assertEquals(0.12f, pointStyle.getInfoWindowAnchorU()); assertEquals(0.98f, pointStyle.getInfoWindowAnchorV()); assertEquals(0.12f, pointStyle.toMarkerOptions().getInfoWindowAnchorU()); assertEquals(0.98f, pointStyle.toMarkerOptions().getInfoWindowAnchorV()); }
/** * 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 Builder<T> toBuilder() { Builder<T> builder = new Builder<T>() .id(id) .object(object) .position(markerOptions.getPosition()) .alpha(markerOptions.getAlpha()) .anchor(markerOptions.getAnchorU(), markerOptions.getAnchorV()) .bitmapDescriptor(markerOptions.getIcon()) .infoWindowAnchor(markerOptions.getInfoWindowAnchorU(), markerOptions.getInfoWindowAnchorV()) .snippet(markerOptions.getSnippet()) .title(markerOptions.getTitle()) .draggable(markerOptions.isDraggable()) .visible(markerOptions.isVisible()) .alpha(markerOptions.getAlpha()) .rotation(markerOptions.getRotation()) .flat(markerOptions.isFlat()); if (divIcon != null) { builder.divIconHtml(divIcon.getHtml()) .divIconWidth(divIcon.getWidth()) .divIconHeight(divIcon.getHeight()); } return builder; }
public void testDefaultGetMarkerOptions() throws Exception { assertEquals(1.0f, pointStyle.toMarkerOptions().getAlpha()); assertEquals(0.5f, pointStyle.toMarkerOptions().getAnchorU()); assertEquals(1.0f, pointStyle.toMarkerOptions().getAnchorV()); assertFalse(pointStyle.toMarkerOptions().isDraggable()); assertFalse(pointStyle.toMarkerOptions().isFlat()); assertNull(pointStyle.toMarkerOptions().getIcon()); assertEquals(0.5f, pointStyle.toMarkerOptions().getInfoWindowAnchorU()); assertEquals(0.0f, pointStyle.toMarkerOptions().getInfoWindowAnchorV()); assertEquals(0.0f, pointStyle.toMarkerOptions().getRotation()); assertNull(pointStyle.toMarkerOptions().getSnippet()); assertNull(pointStyle.toMarkerOptions().getTitle()); assertTrue(pointStyle.toMarkerOptions().isVisible()); }
/** * Gets the info window anchor U coordinate of the GeoJsonPoint. Normalized to [0, 1], of the * info window anchor from the left edge. This is equivalent to the same U value used in {@link * com.google.android.gms.maps.model.MarkerOptions#getInfoWindowAnchorU()}. * * @return info window anchor U coordinate of the GeoJsonPoint */ public float getInfoWindowAnchorU() { return mMarkerOptions.getInfoWindowAnchorU(); }
public float getInfoWindowAnchorU() { return real.getInfoWindowAnchorU(); }
/** * 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; } }