Class: Toybox.WatchUi.MapMarker

Overview

The base class for the MapMarker object.

The MapMarker is used to hold a BitmapResource, or a MAP_MARKER_ICON_* enum value, and the corresponding x, y value to note the "hotspot" for the image to be used as an icon for a marker within a MapView. This class also contains the Location at which the MapMarker should be displayed on the map.

Since:

API Level 3.0.0

Supported Devices:

Instance Method Summary collapse

Instance Method Details

getLocation() as Position.Location

Get the location for the MapMarker.

Returns:

Since:

API Level 3.0.0

initialize(location as Position.Location)

Constructor

Parameters:

  • location(Position.Location)

    The Location at which the MapMarker object will be rendered on the map

Since:

API Level 3.0.0

Throws:

setIcon(icon as Graphics.BitmapType or WatchUi.MapMarkerIcon or Lang.Number, x as Lang.Number, y as Lang.Number) as Void

Set a bitmap icon to use for the MapMarker object on a MapView.

Parameters:

Since:

API Level 3.0.0

Throws:

setLabel(label as Lang.String or Lang.Symbol) as Void

Parameters:

  • label(Lang.String)

    The label for the marker object as a String or String Resource

See Also:

Since:

API Level 3.0.0


Generated May 31, 2023 8:48:51 AM