Map
The Map component enables users to display a map on the app. It can be used to display or choose a single location or multiple locations on the map. The Map component can be used to display the location of a business, a store, or a restaurant. It can also be used to display the location of a user on the map. It allows users to interact with the map interface and pick specific points of interest.
If you are utilizing the self-hosted version of ToolJet, it is necessary to configure the Google Maps API key as an environment variable. Please refer to the environment variable setup documentation.

Properties
Properties | Description | Expected Value |
|---|---|---|
| Initial location | default location when the app is loaded initially. | An object containing the latitude and longitude as key value pairs. ex: {{ {"lat": 40.7128, "lng": -73.935242} }}. |
| Default markers | Number of markers that should be shown on the map. | An array of objects containing the coordinates. ex: {{ [{"lat": 40.7128, "lng": -73.935242}, {"lat": 40.7128, "lng": -73.935242}] }}. |
| Polygon points | Create a polygon on the map using the given coordinates. | An array of objects containing the coordinates. ex: {{ [{"lat": 40.7128, "lng": -73.935242}, {"lat": 40.7128, "lng": -73.935242}] }}. |
| Add new markers | On clicking the map, a new marker will be added to the map. | By default, it's set to On. Toggle off to disable adding new markers on the map. Click fx to set {{true}} or {{false}} programmatically. |
| Search for places | Enable to show the search box on the map. | By default, it's set to On. Toggle off to disable the search box on the map. Click fx to set {{true}} or {{false}} programmatically. |
Events
Event Name | Description |
|---|---|
| On bounds change | Triggers when the bounding area is modified. This event occurs after the bounds variable changes. |
| On create marker | Triggers when a new marker is added to the map. |
| On marker click | Triggers when the user clicks on any of the markers on the map. |
| On polygon click | Triggers when the user clicks on the polygon on the map. |
For detailed information about all the available Actions, please refer to the Action Reference documentation.
Component Specific Actions (CSA)
Following actions of Map component can be controlled using the component specific actions(CSA):
Actions | Description | How To Access |
|---|---|---|
| setLocation | Set the marker's location on map using latitude and longitude values as parameters via a component-specific action within any event handler. | Employ a RunJS query to execute component-specific actions such as: component.map1.setLocation(40.7128, -73.935242). |