The view Map Mode
Learn how to use the view map mode on an embedded map.
We'll cover the following
The view
map mode
The view
mode will display a map with no markers or directions. It won’t focus on any one place in particular. The base URL of this map mode looks like this:
https://www.google.com/maps/embed/v1/view?key=API_KEY&PARAMETERS
Unlike the place
mode, the view mode requires the center
parameter, which accepts comma-separated latitude and longitude values. For example, the values 40.689247,-74.0445025
refer to the Statue of Liberty.
The view
map mode parameters
We can use the following parameters in the view
map mode:
Parameters | Category | Description |
| Required | This parameter sets the center of the map view. It accepts comma-separated latitude and longitude values. |
| Optional | This parameter sets the initial zoom level of the map view. It accepts integer values ranging from The maximum possible zoom value varies depending on the location but is usually |
| Optional | This parameter defines which map type loads. It only accepts |
| Optional | This parameter defines the language for the UI elements and labels on the map. It accepts a two-character ccTLD region code as input. |
| Optional | This parameter defines the appropriate borders and labels to display, and tailors them according to the geopolitical sensitivities of a region. It accepts a two-character ccTLD region code as input. |
Code example
In the code example below, the view
map mode is used to display a map of the Statue of Liberty. The required center
parameter defines the center of the map view.
In lines 13-16 of the HTML file, we assign the center
parameter with the coordinates of the Statue of Liberty, 40.689247,-74.044502
, and pass 18
to the zoom
parameter. That leads to a close-up of the monument with no markers or directions.