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

findDrawableById, onHide, onLayout, onShow, onUpdate, 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


11696
11697
# File 'Monkeybrains.rb', line 11696

def initialize()
end

Instance Method Details

clearObject

Clear all the objects from the map.

Removes all MapPolyline and MapMarker objects.

Since:

  • 3.0.0


11775
11776
# File 'Monkeybrains.rb', line 11775

def clear()
end

getMapModeToybox::Lang::Number

Get the current mode for the map in this MapView.

Returns:

Since:

  • 3.0.0


11736
11737
# File 'Monkeybrains.rb', line 11736

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


11720
11721
# File 'Monkeybrains.rb', line 11720

def setMapMarker(markers)
end

setMapMode(mode) ⇒ Object

Set the mode for the map in this MapView.

Parameters:

Since:

  • 3.0.0


11728
11729
# File 'Monkeybrains.rb', line 11728

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


11749
11750
# File 'Monkeybrains.rb', line 11749

def setMapVisibleArea(topLeft, bottomRight)
end

setPolyline(polyline) ⇒ Object

Add MapPolyline object to be rendered on the map.

Parameters:

Raises:

Since:

  • 3.0.0


11707
11708
# File 'Monkeybrains.rb', line 11707

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


11767
11768
# File 'Monkeybrains.rb', line 11767

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