Types of Google Maps

Advertisements

How to Create Google Map Increase and Decrease Zoom in Google Map

Types of Google Maps

Here we discuss about types of Google Maps. Every map have its own features and uses. Google Maps provides four types of maps. They are.

  • Roadmap (normal, default 2D map)
  • Satellite (photographic map)
  • Hybrid (photographic map + roads and city names)
  • Terrain (map with mountains, rivers, etc.)

Create Roadmap Google Maps

Syntax

	
<!DOCTYPE html>
<html>
<head>
<script
src="https://maps.googleapis.com/maps/api/js">
</script>

<script>
function initialize()
{
  var mapProp = {
    center: new google.maps.LatLng(51.508742,-0.120850),
    zoom:8,
    mapTypeId: google.maps.MapTypeId.ROADMAP
  };
  var map = new google.maps.Map(document.getElementById("googleMap"),mapProp);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>

<body>
<div id="googleMap" style="width:600px;height:300px;"></div>
<br>

</body>
</html>

Output

Create Satellite Google Maps

Syntax

	
<!DOCTYPE html>
<html>
<head>
<script
src="https://maps.googleapis.com/maps/api/js">
</script>

<script>
function initialize()
{
  var mapProp2 = {
    center: new google.maps.LatLng(51.508742,-0.120850),
    zoom:8,
    mapTypeId: google.maps.MapTypeId.SATELLITE
  };
  var map = new google.maps.Map(document.getElementById("googleMap2"),mapProp2);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>

<body>
<div id="googleMap2" style="width:600px;height:300px;"></div>
<br>

</body>
</html>

Output

Create Hybrid Google Maps

Syntax

	
<!DOCTYPE html>
<html>
<head>
<script
src="https://maps.googleapis.com/maps/api/js">
</script>

<script>
function initialize()
{
  var mapProp3 = {
    center: new google.maps.LatLng(51.508742,-0.120850),
    zoom:8,
    mapTypeId: google.maps.MapTypeId.HYBRID
  };
  var map = new google.maps.Map(document.getElementById("googleMap3"),mapProp3);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>

<body>
<div id="googleMap3" style="width:600px;height:300px;"></div>
<br>

</body>
</html>

Output

Create Terrain Google Maps

Syntax

	
<!DOCTYPE html>
<html>
<head>
<script
src="https://maps.googleapis.com/maps/api/js">
</script>

<script>
function initialize()
{
  var mapProp4 = {
    center: new google.maps.LatLng(51.508742,-0.120850),
    zoom:8,
    mapTypeId: google.maps.MapTypeId.TERRAIN
  };
  var map = new google.maps.Map(document.getElementById("googleMap4"),mapProp4);
}

google.maps.event.addDomListener(window, 'load', initialize);
</script>
</head>

<body>
<div id="googleMap4" style="width:600px;height:300px;"></div>
<br>

</body>
</html>

Output


How to Create Google Map Increase and Decrease Zoom in Google Map

Google Advertisment

Buy This Ad Space @$20 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 9999595223

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet


For Projects 9999595223

Google Advertisements


Buy Websites 9999595223

Buy College Projects with Documentation Contact on whatsapp 9999595223. Contact on: hitesh.xc@gmail.com or 9999595223 Try this Keyword C++ Programs

Advertisements