Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Latest commit

 

History

History
43 lines (43 loc) · 1.79 KB

File metadata and controls

43 lines (43 loc) · 1.79 KB

< Previous     Next >


The following map types are supported in Google Maps API:
  • ROADMAP (normal, default 2D map)
  • SATELLITE (photographic map)
  • HYBRID (photographic map + roads and city names)
  • TERRAIN (map with mountains, rivers, etc.)
The map type is specified either within the Map properties object, with the mapTypeId property:
var mapOptions = {
  center:new google.maps.LatLng(51.508742,-0.120850),
  zoom:7,
  mapTypeId: google.maps.MapTypeId.HYBRID
};
Or by calling the map's setMapTypeId() method:
map.setMapTypeId(google.maps.MapTypeId.HYBRID);

45-Degree View

The map types SATELLITE and HYBRID support a 45-degree perspective imagery view for certain locations (only at high zoom levels).
If you zoom into a location with 45-degree imagery view, the map will automatically alter the perspective view. In addition, the map will add:
  • A compass wheel around the Pan control, allowing you to rotate the image.
  • A Rotate control between the Pan and Zoom controls, allowing you to rotate the image at a 90-degree view.
  • A toggle control for displaying the 45-degree view, under the Satellite control/label.
Note: Zooming out from a map with 45-degree imagery will revert each of these changes, and the original map is displayed.
The following example shows a 45-degree perspective view of Palazzo Ducale in Venice, Italy:
var mapOptions = {
  center:myCenter,
  zoom:18,
  mapTypeId:google.maps.MapTypeId.HYBRID
};

Disable 45-Degree View

You can disable 45-degree perspective view by calling setTilt(0) on the Map object:
map.setTilt(0);