Class: Toybox::WatchUi::MapView

Inherits:
View show all

Overview

A View for rendering a map on the screen.

The map is rendered statically and focused on the bounding box and/or a MapMarker point or MapPolyline drawn on the map. The map can be rendered in MAP_MODE_BROWSE or MAP_MODE_PREVIEW mode.

Since:

  • 3.0.0

Direct Known Subclasses

MapTrackView

Direct Known Subclasses

MapTrackView

Instance Method Summary collapse

Methods inherited from View

addLayer, clearLayers, findDrawableById, getLayerIndex, getLayers, insertLayer, onHide, onLayout, onShow, onUpdate, removeLayer, setKeyToSelectableInteraction, setLayout

Methods inherited from Lang::Object

equals, hashCode, method, toString, weak

Constructor Details

initializeMapView

Returns a new instance of MapView

Since:

  • 3.0.0


13028
13029
# File 'Monkeybrains.rb', line 13028

def initialize()
end

Instance Method Details

clearObject

Clear all the objects from the map.

Removes all MapPolyline and MapMarker objects.

Since:

  • 3.0.0


13107
13108
# File 'Monkeybrains.rb', line 13107

def clear()
end

getMapModeToybox::Lang::Number

Get the current mode for the map in this MapView.

Returns:

Since:

  • 3.0.0


13068
13069
# File 'Monkeybrains.rb', line 13068

def getMapMode()
end

setMapMarker(markers) ⇒ Object

Add a MapMarker object or an Array of MapMarker objects to be rendered on the map.

Parameters:

Raises:

Since:

  • 3.0.0


13052
13053
# File 'Monkeybrains.rb', line 13052

def setMapMarker(markers)
end

setMapMode(mode) ⇒ Object

Set the mode for the map in this MapView.

Parameters:

Since:

  • 3.0.0


13060
13061
# File 'Monkeybrains.rb', line 13060

def setMapMode(mode)
end

setMapVisibleArea(topLeft, bottomRight) ⇒ Object

Select the area of the map to render on the screen with a bounding box.

Parameters:

Raises:

See Also:

Since:

  • 3.0.0


13081
13082
# File 'Monkeybrains.rb', line 13081

def setMapVisibleArea(topLeft, bottomRight)
end

setPolyline(polyline) ⇒ Object

Add MapPolyline object to be rendered on the map.

Parameters:

Raises:

Since:

  • 3.0.0


13039
13040
# File 'Monkeybrains.rb', line 13039

def setPolyline(polyline)
end

setScreenVisibleArea(topLeftX, topLeftY, bottomRightX, bottomRightY) ⇒ Object

Set the area on the screen to focus the map.

Parameters:

Raises:

See Also:

Since:

  • 3.0.0


13099
13100
# File 'Monkeybrains.rb', line 13099

def setScreenVisibleArea(topLeftX, topLeftY, bottomRightX, bottomRightY)
end