Google MapsType


Google map of HYBRID type:


Google Maps - Basic Map Types

The following map types are available in the Google Maps API:

  • MapTypeId.ROADMAP, used to display the default road map view
  • MapTypeId.SATELLITE, used to display Google Earth satellite imagery
  • MapTypeId.HYBRID, used to display both the normal view and the satellite view at the same time
  • MapTypeId.TERRAIN, used to display the actual map based on terrain information.

To change the map type being used via Map, you can set its mapTypeId property:

var mapProp = {
  center:new google.maps.LatLng(51.508742,-0.120850),
  zoom:7,
  mapTypeId: google.maps.MapTypeId.HYBRID
};

Or modify mapTypeId dynamically:

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


Google Maps – 45° imagery

The Google Maps API supports special 45° imagery for specific locations.

These high-resolution images provide perspective views oriented toward each of the cardinal directions (north, south, east, west). For supported map types, these images also offer higher zoom levels.

The existing google.maps.MapTypeId.SATELLITE and google.maps.MapTypeId.HYBRID map types support 45° perspective imagery at high zoom levels (if available). If the location you zoom into has such imagery, these map types will automatically change their view in the following ways:

  • Any existing pan controls on the map will be changed to add a compass wheel around the existing navigation controls. You can change the orientation of any 45° image using this compass by dragging the compass wheel and then aligning the direction to the nearest supported direction that contains imagery.
  • A rotation control will be displayed intermittently between the existing pan and zoom controls, and it can be used to rotate the image around the supported direction. The rotation control only supports clockwise rotation.
  • The 45° perspective imagery centered on the current location will replace the satellite or hybrid imagery. By default, this view is oriented toward the north. If you zoom out, the map will re-display the default satellite or hybrid imagery.
  • The MapType control will enable a submenu toggle control for displaying 45° imagery.

Note:Zooming out of a map type displaying 45° imagery will revert all changes and rebuild the original map type.

The following example shows a 45° view of the Doge's Palace in Venice, Italy:

Example

var mapProp = { center:myCenter, zoom:18, mapTypeId:google.maps.MapTypeId.HYBRID };

Try it Yourself »

Tip:Google is continually adding 45° imagery for more cities. For the latest information, please refer to45° imagery on Google MapsList.


Google Map - Enable and disable 45° imagery - setTilt(0)

You can disable 45° imagery by calling setTilt(0) on the Map object. To enable 45° perspective imagery for supported map types, call setTilt(45).

Example

map.setTilt(0);

Try it Yourself »

Google Maps - Reference Manual

Google Maps API Reference Manual。

other extensions