Extends Item


Displays an interactive map.

MapView {
    latitude: 48.858384
    longitude: 2.294471
    zoom: 13

On touch screen devices, you can manipulate a map using the regular drag and pinch gestures. Otherwise, you can zoom a map using the mouse wheel and adjust the pitch and bearing by holding the ⌥ key while dragging the map.

User interaction can be disabled entirely by setting the interative property to false.

Native Export

Zing uses Mapbox to provide its wonderful vector maps. If you export your prototype as an Xcode or Android Studio project, you will require your own MapBox access token to use MapView. You can sign up for a free access token at https://www.mapbox.com and add it to your project under "Project Settings".

property Bool enabled: true

When true, the MapView element is enabled and will load and display the map.

A disabled MapView does not show the map and does not respond to user interaction.

property Bool interactive: true

An interactive map can be manipulated by the user. A non-interactive map does not respond to user input, but its properties can still be modified programatically.

property Float latitude: 0

property Float longitude: 0

The latitude and longitude of the map centerpoint.

property Float zoom: 1

property Float pitch: 0

property Float bearing: 0

The zoom, pitch and bearing of the map.

The zoom value is valid between 0 (world view) to 20 (close street view). The pitch value is valid between 0 and 60. Values outside these ranges will be clamped internally.

function jumpTo(MapView.Place place)

function jumpTo(Float latitude, Float longitude, Float zoom)

Jump immediately to the specified place, or to the given latitude, longitude and zoom level. This is equivalent to setting the latitude, longitude and zoom properties directly.

function flyTo(MapView.Place place)

function flyTo(Float latitude, Float longitude, Float zoom)

static function MapView.findPlace(String place) → Task<MapView.FindPlaceResponse>

This section discusses the "MapView Find Place" project.Save