Google Maps | Types

To customize the Google map, there are four types of maps provide.
- ROADMAP: This type of map shows the street view of the specific area. It is the default type map.
- SATELLITE: This type of map shows the satellite images of the specific area.
- HYBRID: This type of map shows the major streets of the specific area.
- TERRAIN: This type of map shows the terrain and vegetation.
Syntax:
var CustomOp= {
   mapTypeId:google.maps.MapTypeId.ROADMAP | SATELLITE | HYBRID | TERRAIN
};
Example 1: ROADMAP
| <!DOCTYPE html> <html>  Â<head>     <title>         Google Maps | Types     </title>  Â    <!-- Add Google map API source -->    <scriptsrc=      </script>         Â    <script>         function GFG() {             var CustomOp = {                 center:new google.maps.LatLng(                         28.502212, 77.405603),                  zoom:17,                  mapTypeId:google.maps.MapTypeId.ROADMAP             };               Â            // Map object             var map = new google.maps.Map(                 document.getElementById("DivID"),                 CustomOp             );         }     </script> </head>  Â<!-- Function that execute when page load --><bodyonload= "GFG()">     <center>         <h1style="color:green">             zambiatek         </h1>          Â        <h3>Google Maps</h3>          Â        <!-- Basic Container -->        <divid= "DivID"style=              "width:400px; height:300px;">         </div>     </center> </body>      Â</html>  | 
Output:
Example 2: SATELLITE
| <!DOCTYPE html> <html>  Â<head>     <title>         Google Maps | Types     </title>  Â    <!-- Add Google map API source -->    <scriptsrc=      </script>         Â    <script>         function GFG() {             var CustomOp = {                 center:new google.maps.LatLng(                         28.502212, 77.405603),                  zoom:17,                  mapTypeId:google.maps.MapTypeId.SATELLITE             };               Â            // Map object             var map = new google.maps.Map(                 document.getElementById("DivID"),                 CustomOp             );         }     </script> </head>  Â<!-- Function that execute when page load --><bodyonload= "GFG()">     <center>         <h1style="color:green">             zambiatek         </h1>          Â        <h3>Google Maps</h3>          Â        <!-- Basic Container -->        <divid= "DivID"style=              "width:400px; height:300px;">         </div>     </center> </body>      Â</html>  | 
Output:
Example 3: HYBRID
| <!DOCTYPE html> <html>  Â<head>     <title>         Google Maps | Types     </title>  Â    <!-- Add Google map API source -->    <scriptsrc=      </script>         Â    <script>         function GFG() {             var CustomOp = {                 center:new google.maps.LatLng(                         28.502212, 77.405603),                  zoom:17,                  mapTypeId:google.maps.MapTypeId.HYBRID             };               Â            // Map object             var map = new google.maps.Map(                 document.getElementById("DivID"),                 CustomOp             );         }     </script> </head>  Â<!-- Function that execute when page load --><bodyonload= "GFG()">     <center>         <h1style="color:green">             zambiatek         </h1>          Â        <h3>Google Maps</h3>          Â        <!-- Basic Container -->        <divid= "DivID"style=              "width:400px; height:300px;">         </div>     </center> </body>      Â</html>  | 
Output:
Example 4: TERRAIN
| <!DOCTYPE html> <html>  Â<head>     <title>         Google Maps | Types     </title>  Â    <!-- Add Google map API source -->    <scriptsrc=      </script>         Â    <script>         function GFG() {             var CustomOp = {                 center:new google.maps.LatLng(                         28.502212, 77.405603),                  zoom:17,                  mapTypeId:google.maps.MapTypeId.TERRAIN             };               Â            // Map object             var map = new google.maps.Map(                 document.getElementById("DivID"),                 CustomOp             );         }     </script> </head>  Â<!-- Function that execute when page load --><bodyonload= "GFG()">     <center>         <h1style="color:green">             zambiatek         </h1>          Â        <h3>Google Maps</h3>          Â        <!-- Basic Container -->        <divid= "DivID"style=              "width:400px; height:300px;">         </div>     </center> </body>      Â</html>  | 
Output:
Whether you’re preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, zambiatek Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we’ve already empowered, and we’re here to do the same for you. Don’t miss out – check it out now!
 
				 
					



