Example
Change the kind of map to display:
map.setMapTypeId(google.maps.MapTypeId.TERRAIN);
Try it Yourself »
Definition and Usage
The setMapTypeId() method is used to change the kind of map to display.
Syntax
mapvariable.setMapTypeId(google.maps.MapTypeId.CONSTANT);
Constants of MapTypeId
Constant | Description |
---|---|
HYBRID | Displays a photographic map + roads and city names |
ROADMAP | Displays a normal, default 2D map |
SATELLITE | Displays a photographic map |
TERRAIN | Displays a map with mountains, rivers, etc. |