Package com.navmii.sdk.map
Class GeoMarker
java.lang.Object
com.navmii.sdk.map.GeoObject
com.navmii.sdk.map.GeoMarker
public final class GeoMarker extends GeoObject
-
Constructor Summary
Constructors Constructor Description GeoMarker(MapCoordinates coordinates, android.graphics.drawable.Drawable image, android.graphics.PointF anchorPoint)
Creates a marker with the specified coordinates and image path.GeoMarker(MapCoordinates coordinates, java.io.File imagePath, android.graphics.PointF anchorPoint)
Creates a marker with the specified coordinates and image path. -
Method Summary
Modifier and Type Method Description android.graphics.PointF
getAnchorPoint()
MapCoordinates
getCoordinates()
Returns the location of the marker on the map.java.io.File
getImagePath()
OrientationIn3D
getOrientationIn3D()
float
getRotationAngle()
boolean
isClickable()
void
setClickable(boolean isClickable)
Determines whether the marker is clickable, i.e.void
setCoordinates(MapCoordinates coordinates)
Sets the location of the marker on the map.void
setImage(android.graphics.drawable.Drawable image, android.graphics.PointF anchorPoint)
void
setImagePath(java.io.File imagePath, android.graphics.PointF anchorPoint)
void
setOrientationIn3D(OrientationIn3D orientationIn3D)
Defines if the marker is oriented vertically or horizontally on the screen when camera's tilt is greater than 0.void
setRotationAngle(float rotationAngle)
Sets the point of rotation of the marker.
-
Constructor Details
-
GeoMarker
public GeoMarker(MapCoordinates coordinates, java.io.File imagePath, android.graphics.PointF anchorPoint)Creates a marker with the specified coordinates and image path.- Parameters:
coordinates
- The coordinates of the marker.imagePath
- The absolute path of the marker image.anchorPoint
- The anchor point.- See Also:
setImagePath(File, PointF)
-
GeoMarker
public GeoMarker(MapCoordinates coordinates, android.graphics.drawable.Drawable image, android.graphics.PointF anchorPoint)Creates a marker with the specified coordinates and image path.- Parameters:
coordinates
- The coordinates of the marker.image
- The marker image.anchorPoint
- The anchor point.- See Also:
setImage(Drawable, PointF)
-
-
Method Details
-
getCoordinates
Returns the location of the marker on the map.- Returns:
- The coordinates of the marker.
-
setCoordinates
Sets the location of the marker on the map.- Parameters:
coordinates
- The coordinates of the marker.
-
setImage
public void setImage(android.graphics.drawable.Drawable image, android.graphics.PointF anchorPoint)- Parameters:
image
- The marker image.anchorPoint
- The anchor point of the image.
-
getImagePath
@Nullable public java.io.File getImagePath()- Returns:
- The absolute path of the marker image.
-
setImagePath
public void setImagePath(java.io.File imagePath, android.graphics.PointF anchorPoint)- Parameters:
imagePath
- The absolute path of the marker image.anchorPoint
- The anchor point of the image.
-
getAnchorPoint
public android.graphics.PointF getAnchorPoint()- Returns:
- The anchor point.
-
isClickable
public boolean isClickable()- Returns:
- true if the marker is clickable, false otherwise.
- See Also:
setClickable(boolean)
-
setClickable
public void setClickable(boolean isClickable)Determines whether the marker is clickable, i.e. informsMapView
geo object listeners.- Parameters:
isClickable
- true if the marker is clickable, false otherwise.- See Also:
MapView.addGeoObjectListener(MapView.GeoObjectListener)
-
getRotationAngle
public float getRotationAngle()- Returns:
- The rotation angle in degrees, measured clockwise.
- See Also:
setRotationAngle(float)
-
setRotationAngle
public void setRotationAngle(float rotationAngle)Sets the point of rotation of the marker. The point's x and y take values from 0.f to 1.f and define the rotation point displacement relative to the marker's image size. Only markers withOrientationIn3D.HORIZONTAL
orientation can be rotated.- Parameters:
rotationAngle
- The rotation angle in degrees, measured clockwise.- See Also:
setOrientationIn3D(OrientationIn3D)
-
getOrientationIn3D
- Returns:
- The orientation of the marker.
-
setOrientationIn3D
Defines if the marker is oriented vertically or horizontally on the screen when camera's tilt is greater than 0.- Parameters:
orientationIn3D
- The orientation of the marker.
-