@magiclane/maps-sdk
    Preparing search index...

    Class Marker

    Marker

    A compact map model representing a visual geometry (icon, point, polyline or polygon) placed at geographic coordinates for annotations, waypoints or temporary content.

    Common operations include creating, managing their geometric parts and coordinates (adding, updating and removing points or parts), querying the enclosing bounds and coordinate lists for layout or hit‑testing, reading and setting basic metadata such as title and identifier.

    Can be added to a MarkerCollection and displayed on the map using the MapViewMarkerCollections object associated with a GemMapController. The appearance is highly customizable using the MarkerRenderSettings and MarkerCollectionRenderSettings class.

    Index

    Constructors

    • Parameters

      • id: any = 0
      • mapId: number = 0

      Returns Marker

    Accessors

    • get id(): number

      Get marker unique id.

      Returns number

      marker id

    • get mapId(): number

      Returns number

    • get name(): string

      Get marker name.

      Returns string

      marker name

    • set name(name: string): void

      Set marker name.

      Parameters

      • name: string

        The name

      Returns void

    • get partCount(): number

      Get marker parts count.

      Returns number

      marker parts count

    • get pointerId(): any

      Returns any

    Methods

    • Add a new coordinate to the marker.

      Parameters

      • coord: Coordinates

        The coordinate to be added

      • options: { index?: number; part?: number } = {}

        Parameters object

        • Optionalindex?: number

          The position where the coordinate is added, default -1 (append at the end)

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part)

      Returns void

    • Delete a coordinate from the marker.

      Parameters

      • index: number

        The position of the deleted coordinate

      • options: { part?: number } = {}

        Parameters object

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part)

      Returns void

    • Delete a part from marker.

      Parameters

      • part: number

        The marker part index to be deleted

      Returns void

    • Delete a range of coordinates from the marker between given indexes.

      Parameters

      • startIndex: number

        The start index of the deleted coordinates list

      • endIndex: number

        The last index of the deleted coordinates list (excluding). If -1, the delete will perform until the end of the coordinates list

      • params: { part?: number } = {}

        Object containing part number

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part)

      Returns void

    • Returns void

    • Get coordinate from the given part, at the given index.

      Parameters

      • index: number

        The marker index to which the function applies

      • part: number

        The marker part index to which the function applies

      Returns Coordinates

      Coordinates object located at the specified index in the part

    • Get marker coordinates list.

      Parameters

      • options: { part?: number } = {}

        Parameters object

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part)

      Returns Coordinates[]

      Coordinates list

    • Get marker coordinates count.

      Parameters

      • params: { part?: number } = {}

        Object containing part number

        • Optionalpart?: number

          The marker part index to which the function applies, default 0

      Returns number

      Coordinates count if part is valid otherwise error::KInvalidInput

    • Get marker part enclosing area.

      Parameters

      • part: number

        The marker part index to which the function applies

      Returns RectangleGeographicArea

      RectangleGeographicArea object

    • Set marker part coordinates.

      Parameters

      • coords: Coordinates[]

        The coordinates list to be set as marker part

      • options: { part?: number } = {}

        Parameters object

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part) Note: If part == partCount, a new part is automatically added to the marker and the coordinate is assigned to it

      Returns void

    • Update a coordinate in the marker.

      Parameters

      • coord: Coordinates

        The new coordinate value

      • index: number

        The position of the updated coordinate

      • options: { part?: number } = {}

        Parameters object

        • Optionalpart?: number

          The marker part index to which the function applies, default 0 (first part)

      Returns void

    • Parameters

      • mapId: number

      Returns Marker

    • Create marker from circle with center and radius.

      Parameters

      • center: Coordinates

        Circle center coordinates

      • radius: number

        Circle radius in meters

      Returns Marker

    • Create marker from circle with center and horizontal/vertical radii.

      Parameters

      • params: { centerCoords: Coordinates; horizRadius: number; vertRadius: number }

        Object containing centerCoords, horizRadius, and vertRadius

        • centerCoords: Coordinates

          Rectangle center coordinates

        • horizRadius: number

          Horizontal rectangle radius in meters

        • vertRadius: number

          Vertical rectangle radius in meters

      Returns Marker

    • Construct from a list of coordinates.

      Parameters

      Returns Marker

    • Create marker from rectangle with top-left and bottom-right corners.

      Parameters

      Returns Marker