/** * Creates a new Style object */ public Style() { mMarkerOptions = new MarkerOptions(); mPolylineOptions = new PolylineOptions(); mPolygonOptions = new PolygonOptions(); }
@Override public void onSuccess() { if (marker != null && marker.isInfoWindowShown()) { marker.showInfoWindow(); } } }
public Builder<T> iconId(int iconId) { try { markerOptions.icon(BitmapDescriptorFactory.fromResource(iconId)); } catch (NullPointerException ignored) { // google play services is not available } return this; }
private void addMarker(GoogleMap map, double lat, double lon, int title, int snippet, int hue) { map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) .title(getString(title)) .snippet(getString(snippet)) .icon(BitmapDescriptorFactory.defaultMarker(hue))); } }
private void addMarker(GoogleMap map, double lat, double lon, int title, int snippet) { Marker marker= map.addMarker(new MarkerOptions().position(new LatLng(lat, lon)) .title(getString(title)) .snippet(getString(snippet))); builder.include(marker.getPosition()); } }
/** * Creates a new PolylineOption from given properties of an existing PolylineOption * @param originalPolylineOption An existing PolylineOption instance * @return A new PolylineOption */ private static PolylineOptions createPolylineOptions (PolylineOptions originalPolylineOption) { PolylineOptions polylineOptions = new PolylineOptions(); polylineOptions.color(originalPolylineOption.getColor()); polylineOptions.width(originalPolylineOption.getWidth()); return polylineOptions; }
public MyItem(double lat, double lng) { mPosition = new LatLng(lat, lng); mTitle = null; mSnippet = null; }
/** * Sets the width of the LineString in screen pixels * * @param width width value of the LineString */ public void setLineStringWidth(float width) { mPolylineOptions.width(width); }
public void hideAll() { for (Marker marker : mMarkers) { marker.setVisible(false); } }
/** * Gets the stroke color of the GeoJsonPolygon as a 32-bit ARGB color * * @return stroke color of the GeoJsonPolygon */ public int getStrokeColor() { return mPolygonOptions.getStrokeColor(); }
/** * Gets the Anchor U coordinate of the GeoJsonPoint. Normalized to [0, 1], of the anchor from * the left edge. This is equivalent to the same U value used in {@link * com.google.android.gms.maps.model.MarkerOptions#getAnchorU()}. * * @return Anchor U coordinate of the GeoJsonPoint */ public float getAnchorU() { return mMarkerOptions.getAnchorU(); }
/** * Gets the Anchor V coordinate of the GeoJsonPoint. Normalized to [0, 1], of the anchor from * the top edge. This is equivalent to the same V value used in {@link * com.google.android.gms.maps.model.MarkerOptions#getAnchorV()}. * * @return Anchor V coordinate of the GeoJsonPoint */ public float getAnchorV() { return mMarkerOptions.getAnchorV(); }
/** * Gets the width of the GeoJsonLineString in screen pixels * * @return width of the GeoJsonLineString */ public float getWidth() { return mPolylineOptions.getWidth(); }
/** * Gets a bitmap image for the GeoJsonPoint * * @return bitmap descriptor for the GeoJsonPoint */ public BitmapDescriptor getIcon() { return mMarkerOptions.getIcon(); }
/** * Gets whether the GeoJsonPoint is flat * * @return true if GeoJsonPoint is flat, false if not flat */ public boolean isFlat() { return mMarkerOptions.isFlat(); }
/** * 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(); }
/** * Gets the info window anchor V coordinate of the GeoJsonPoint. Normalized to [0, 1], of the * info window anchor from the top edge. This is equivalent to the same V value used in {@link * com.google.android.gms.maps.model.MarkerOptions#getInfoWindowAnchorV()}. * * @return info window anchor V coordinate of the GeoJsonPoint */ public float getInfoWindowAnchorV() { return mMarkerOptions.getInfoWindowAnchorV(); }
/** * Gets the title of the GeoJsonPoint * * @return title of the GeoJsonPoint */ public String getTitle() { return mMarkerOptions.getTitle(); }
/** * Gets the rotation of a marker in degrees clockwise about the marker's anchor * * @return rotation of the Point */ public float getRotation() { return mMarkerOptions.getRotation(); }
/** * Gets the clickability setting for this Options object * * @return true if the GeoJsonLineString is clickable; false if it is not */ public boolean isClickable() { return mPolylineOptions.isClickable(); }