Class GeoJsonPointStyle
- java.lang.Object
-
- java.util.Observable
-
- com.google.maps.android.data.Style
-
- com.google.maps.android.data.geojson.GeoJsonPointStyle
-
public class GeoJsonPointStyle extends Style
A class that allows for GeoJsonPoint objects to be styled and for these styles to be translated into a MarkerOptions object. {@see MarkerOptions docs for more details about the options.}
-
-
Constructor Summary
Constructors Constructor Description GeoJsonPointStyle()Creates a new PointStyle object
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description floatgetAlpha()Gets the alpha of the GeoJsonPoint.floatgetAnchorU()Gets the Anchor U coordinate of the GeoJsonPoint.floatgetAnchorV()Gets the Anchor V coordinate of the GeoJsonPoint.java.lang.String[]getGeometryType()com.google.android.gms.maps.model.BitmapDescriptorgetIcon()Gets a bitmap image for the GeoJsonPointfloatgetInfoWindowAnchorU()Gets the info window anchor U coordinate of the GeoJsonPoint.floatgetInfoWindowAnchorV()Gets the info window anchor V coordinate of the GeoJsonPoint.floatgetRotation()Gets the rotation of the GeoJsonPoint in degrees clockwise about the marker's anchor pointjava.lang.StringgetSnippet()Gets the snippet of the GeoJsonPointjava.lang.StringgetTitle()Gets the title of the GeoJsonPointfloatgetZIndex()Gets the z index of the GeoJsonLineStringbooleanisDraggable()Gets whether the GeoJsonPoint is draggablebooleanisFlat()Gets whether the GeoJsonPoint is flatbooleanisVisible()Gets whether the GeoJsonPoint is visiblevoidsetAlpha(float alpha)Sets the alpha of the GeoJsonPoint.voidsetAnchor(float anchorU, float anchorV)Sets the Anchor U and V coordinates of the GeoJsonPoint.voidsetDraggable(boolean draggable)Sets the GeoJsonPoint to be draggablevoidsetFlat(boolean flat)Sets the GeoJsonPoint to be flatvoidsetIcon(com.google.android.gms.maps.model.BitmapDescriptor bitmap)Sets a bitmap image for the GeoJsonPointvoidsetInfoWindowAnchor(float infoWindowAnchorU, float infoWindowAnchorV)Sets the info window anchor U and V coordinates of the GeoJsonPoint.voidsetRotation(float rotation)Sets the rotation of the GeoJsonPoint in degrees clockwise about the marker's anchor pointvoidsetSnippet(java.lang.String snippet)Sets the snippet of the GeoJsonPointvoidsetTitle(java.lang.String title)Sets the title of the GeoJsonPointvoidsetVisible(boolean visible)Sets whether the GeoJsonPoint is visiblevoidsetZIndex(float zIndex)Sets the z index of the GeoJsonLineStringcom.google.android.gms.maps.model.MarkerOptionstoMarkerOptions()Gets a new MarkerOptions object containing styles for the GeoJsonPointjava.lang.StringtoString()-
Methods inherited from class com.google.maps.android.data.Style
setLineStringWidth, setMarkerHotSpot, setMarkerRotation, setPolygonFillColor, setPolygonStrokeWidth
-
-
-
-
Method Detail
-
getGeometryType
public java.lang.String[] getGeometryType()
-
getAlpha
public float getAlpha()
Gets the alpha of the GeoJsonPoint. This is a value from 0 to 1, where 0 means the marker is completely transparent and 1 means the marker is completely opaque.- Returns:
- alpha of the GeoJsonPoint
-
setAlpha
public void setAlpha(float alpha)
Sets the alpha of the GeoJsonPoint. This is a value from 0 to 1, where 0 means the marker is completely transparent and 1 means the marker is completely opaque.- Parameters:
alpha- alpha value of the GeoJsonPoint
-
getAnchorU
public float getAnchorU()
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 inMarkerOptions.getAnchorU().- Returns:
- Anchor U coordinate of the GeoJsonPoint
-
getAnchorV
public float getAnchorV()
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 inMarkerOptions.getAnchorV().- Returns:
- Anchor V coordinate of the GeoJsonPoint
-
setAnchor
public void setAnchor(float anchorU, float anchorV)Sets the Anchor U and V coordinates of the GeoJsonPoint. The anchor point is specified in the continuous space [0.0, 1.0] x [0.0, 1.0], where (0, 0) is the top-left corner of the image, and (1, 1) is the bottom-right corner. The U & V values are the same U & V values used inMarkerOptions.anchor(float, float)()}.- Parameters:
anchorU- Anchor U coordinate of the GeoJsonPointanchorV- Anchor V coordinate of the GeoJsonPoint
-
isDraggable
public boolean isDraggable()
Gets whether the GeoJsonPoint is draggable- Returns:
- true if GeoJsonPoint is draggable, false if not draggable
-
setDraggable
public void setDraggable(boolean draggable)
Sets the GeoJsonPoint to be draggable- Parameters:
draggable- true if GeoJsonPoint is draggable, false if not draggable
-
isFlat
public boolean isFlat()
Gets whether the GeoJsonPoint is flat- Returns:
- true if GeoJsonPoint is flat, false if not flat
-
setFlat
public void setFlat(boolean flat)
Sets the GeoJsonPoint to be flat- Parameters:
flat- true if GeoJsonPoint is flat, false if not flat
-
getIcon
public com.google.android.gms.maps.model.BitmapDescriptor getIcon()
Gets a bitmap image for the GeoJsonPoint- Returns:
- bitmap descriptor for the GeoJsonPoint
-
setIcon
public void setIcon(com.google.android.gms.maps.model.BitmapDescriptor bitmap)
Sets a bitmap image for the GeoJsonPoint- Parameters:
bitmap- bitmap descriptor for the GeoJsonPoint
-
getInfoWindowAnchorU
public float getInfoWindowAnchorU()
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 inMarkerOptions.getInfoWindowAnchorU().- Returns:
- info window anchor U coordinate of the GeoJsonPoint
-
getInfoWindowAnchorV
public float getInfoWindowAnchorV()
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 inMarkerOptions.getInfoWindowAnchorV().- Returns:
- info window anchor V coordinate of the GeoJsonPoint
-
setInfoWindowAnchor
public void setInfoWindowAnchor(float infoWindowAnchorU, float infoWindowAnchorV)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 inMarkerOptions.infoWindowAnchor(float, float).- Parameters:
infoWindowAnchorU- info window anchor U coordinate of the GeoJsonPointinfoWindowAnchorV- info window anchor V coordinate of the GeoJsonPoint
-
getRotation
public float getRotation()
Gets the rotation of the GeoJsonPoint in degrees clockwise about the marker's anchor point- Overrides:
getRotationin classStyle- Returns:
- rotation of the GeoJsonPoint
-
setRotation
public void setRotation(float rotation)
Sets the rotation of the GeoJsonPoint in degrees clockwise about the marker's anchor point- Parameters:
rotation- rotation value of the GeoJsonPoint
-
getSnippet
public java.lang.String getSnippet()
Gets the snippet of the GeoJsonPoint- Returns:
- snippet of the GeoJsonPoint
-
setSnippet
public void setSnippet(java.lang.String snippet)
Sets the snippet of the GeoJsonPoint- Parameters:
snippet- sets the snippet value of the GeoJsonPoint
-
getTitle
public java.lang.String getTitle()
Gets the title of the GeoJsonPoint- Returns:
- title of the GeoJsonPoint
-
setTitle
public void setTitle(java.lang.String title)
Sets the title of the GeoJsonPoint- Parameters:
title- title value of the GeoJsonPoint
-
isVisible
public boolean isVisible()
Gets whether the GeoJsonPoint is visible- Returns:
- true if GeoJsonPoint is visible, false if not visible
-
setVisible
public void setVisible(boolean visible)
Sets whether the GeoJsonPoint is visible- Parameters:
visible- true if GeoJsonPoint is visible, false if not visible
-
toMarkerOptions
public com.google.android.gms.maps.model.MarkerOptions toMarkerOptions()
Gets a new MarkerOptions object containing styles for the GeoJsonPoint- Returns:
- new MarkerOptions object
-
toString
@NonNull public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getZIndex
public float getZIndex()
Gets the z index of the GeoJsonLineString- Returns:
- z index of the GeoJsonLineString
-
setZIndex
public void setZIndex(float zIndex)
Sets the z index of the GeoJsonLineString- Parameters:
zIndex- z index value of the GeoJsonPoint
-
-