Class GeoMarker


  • public final class GeoMarker
    extends GeoObject
    • Constructor Detail

      • 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 Detail

      • getCoordinates

        public MapCoordinates getCoordinates()
        Returns the location of the marker on the map.
        Returns:
        The coordinates of the marker.
      • setCoordinates

        public void setCoordinates​(MapCoordinates coordinates)
        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)
      • 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 with OrientationIn3D.HORIZONTAL orientation can be rotated.
        Parameters:
        rotationAngle - The rotation angle in degrees, measured clockwise.
        See Also:
        setOrientationIn3D(OrientationIn3D)
      • getOrientationIn3D

        public OrientationIn3D getOrientationIn3D()
        Returns:
        The orientation of the marker.
      • setOrientationIn3D

        public void setOrientationIn3D​(OrientationIn3D orientationIn3D)
        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.