Map APIsetMapTypeId()Methods

Map() constructor

Example

Change the map type to display:

map.setMapTypeId(google.maps.MapTypeId.TERRAIN);

Try it Yourself »

Definition and Usage

The setMapTypeId() method is used to change the type of map to be displayed.


Syntax

mapvariable.setMapTypeId(google.maps.MapTypeId.CONSTANT);


MapTypeId constants

Constant Description
HYBRID Displays a photographic map with roads and city names.
ROADMAP Displays a standard map, which is 2D by default.
SATELLITE Display a photographic map.
TERRAIN Displays a map with mountains, rivers, and other features.


Map() constructor

other extensions