Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Google Maps Types

Google Maps Types


Google Map of HYBRID type:


Google Maps - Basic Map Types

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

To modify 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 dynamically modify mapTypeId:

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


Google Maps - 45 Degree Images

The Google Maps API supports special 45 degree images for specific locations.

Such high-resolution images can provide perspective views toward each basic direction (southeast, northwest). For supported map types, these images can also provide higher zoom levels.

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

**Note:** Zooming out the map type that displays 45 degree images will revert all changes and rebuild the original map type.

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

Example

var

mapProp

=

{

center

:

myCenter

,

zoom

:

18

,

mapTypeId

:

google

.

maps

.

MapTypeId

.

HYBRID

}

;

Try it »

**Tip:** Google is continuously adding 45 degree images for more cities. For the latest information, please refer to 45 Degree Images on Google Mapsthe list.


Google Maps - Enable and Disable 45 Degree Images - setTilt(0)

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

Example

map.setTilt(0);

Try it »


Google Maps - Reference Manual

Google Maps API Reference Manual.