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


13025
13026
# File 'Monkeybrains.rb', line 13025

def initialize()
end

Instance Method Details

clearObject

Clear all the objects from the map.

Removes all MapPolyline and MapMarker objects.

Since:

  • 3.0.0


13104
13105
# File 'Monkeybrains.rb', line 13104

def clear()
end

getMapModeToybox::Lang::Number

Get the current mode for the map in this MapView.

Returns:

Since:

  • 3.0.0


13065
13066
# File 'Monkeybrains.rb', line 13065

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


13049
13050
# File 'Monkeybrains.rb', line 13049

def setMapMarker(markers)
end

setMapMode(mode) ⇒ Object

Set the mode for the map in this MapView.

Parameters:

Since:

  • 3.0.0


13057
13058
# File 'Monkeybrains.rb', line 13057

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


13078
13079
# File 'Monkeybrains.rb', line 13078

def setMapVisibleArea(topLeft, bottomRight)
end

setPolyline(polyline) ⇒ Object

Add MapPolyline object to be rendered on the map.

Parameters:

Raises:

Since:

  • 3.0.0


13036
13037
# File 'Monkeybrains.rb', line 13036

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


13096
13097
# File 'Monkeybrains.rb', line 13096

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