This component is not supported for Google Ads, Google AdMob, AMPHTML ads , video ads , or image ads .
The Map component lets you display a customized, interactive map.
To add the Map component to your project:
- Open the Componentspanel, then the Mapsfolder.
- Drag the Mapcomponent to the stage.
- In the Mapproperties section of the Propertiespanel, enter your Google Maps Platform API key in the Google API Keyfield.
- Enter the Latitudeand Longitudeproperties to set the default center point of the map. (Learn how to find the coordinates of a place on Google Maps.) You can also check the Request user location box to prompt the user for their location and show it on the map.
- If you want to display markers on the map for specific places, enter a Search term.
Properties
Property | Description |
---|---|
Name | The component name. |
Google API Key (required) | Your Google Maps Platform API key. The Google Cloud Platform project with this API key should have the Maps JavaScript API enabled. Can be bound to dynamic data . |
Search term | The search term to use. Resulting places will be displayed on the map with markers. Make sure the Places API is enabled for your Google Cloud Platform project . Can be bound to dynamic data . |
Latitude | The latitude for your default map center location. Can be bound to dynamic data . |
Longitude | The longitude for your default map center location. Can be bound to dynamic data . |
Request user location | Check this box to ask the user for their location. Make sure the Geocoding API is enabled for your Google Cloud Platform project to allow users to enter an address. Can be bound to dynamic data . |
Advanced properties
Click the expand iconnext to Advanced propertiesin the component properties pane to edit the following advanced properties:
(deprecated)
The default zoom level for the map. The following list shows the approximate level of detail you can expect to see at each zoom level:
- 1- World
- 5- Landmass/continent
- 10- City
- 15- Streets
- 20- Buildings
Can be bound to dynamic data .
The sprite needs two marker icons in the following order:
- Default marker - 34x34
- Active marker (displayed if the user selects the marker) - 34x34 starting at (34,0)
Can be bound to dynamic data .
Events and actions
Events sent by the Map componentYou can trigger other actions based on the following Map component event:
Event | Description |
---|---|
Pin click | Sent when the user clicks a location marker on the map. |
To select this event in the Eventdialog, set the Map component as the target.
The following Map component action can be triggered in response to other events:
- Latitude
- Longitude
- Accuracy
When you select this action in the Eventdialog, set the Map component as the receiver.
Learn how to configure events .
Preview
This component can't be previewed inside the Google Web Designer interface. To see the component in action, preview your document in your preferred browser by clicking the Previewbutton in the upper right corner.