YouTip LogoYouTip

Ref Setmaptypeid

Map API setMapTypeId() Method

Map API setMapTypeId() Method

--

Google Maps API Tutorial

Google API TutorialGoogle Maps APIGoogle Maps BasicsGoogle Maps OverlaysGoogle Maps EventsGoogle Maps ControlsGoogle Maps TypesGoogle Maps Reference ManualMap API Map() Constructor

Google Maps Reference Manual

Deep Dive

  • Maps
  • Programming
  • Programming Languages
  • Web Services
  • Scripting Languages
  • Computer Science
  • Scripts
  • Development Tools
  • Software
  • Web Services

Map API setMapTypeId() Method

Image 3: Map() Constructor 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 map type 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, default 2D map.
SATELLITE Displays a photographic map.
TERRAIN Displays a map showing mountains, rivers, etc.

Image 4: Map() Constructor Map() Constructor

← Mongodb Window InstallRef Getzoom β†’