The Map component for Retool Mobile
An embedded map with custom locations.
An embedded map using MapBox to display latitude and longitude coordinates as points of interest. It supports default coordinates and can trigger queries when selecting a point.
Properties
All properties for this object with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
aspectRatio
The ratio of width-to-height (e.g., 1.3
to use 4:3 ratio).
Type | number | ||||
Format | Float | ||||
Mutability |
|
Examples
geoJson
GeoJSON objects to display on the map, such as polygons.
Type | object | ||||
Mutability |
|
geoJsonLayerStyle
Mapbox GeoJSON layer styles that override any other applied styling.
Type | object | ||||
Mutability |
|
hidden
Whether this object is hidden from view.
Type | boolean | ||||||
Format | True/False | ||||||
Mutability |
| ||||||
Default |
|
Examples
latitude
The latitudinal position.
Type | number | ||||||
Mutability |
|
longitude
The longitudinal position.
Type | number | ||||||
Mutability |
|
mapStyle
The Mapbox style to use.
Type | string | ||||||||||||||||
Mutability |
| ||||||||||||||||
Allowed Values |
|
points
A list of map points to display.
Type | array | ||||
Array values | object | ||||
Mutability |
|
Array Object Properties
Methods
JavaScript API methods for this object. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
map.scrollIntoView()
Scrolls the canvas or parent container so that the selected component appears in the visible area.
map.scrollIntoView(options)
Parameters
Examples
map.setHidden()
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
map.setHidden(hidden)
Parameters
Examples
Events
Events triggered by user interactions. You can configure event handlers in the IDE to trigger queries or other actions in response to events.
Event | Description |
---|---|
Point Pressed | A point of interest is clicked or pressed or pressed. |