Enter your email id to get regular update free
Your Email

How to display HTML Google Maps?

Google Maps allows to display maps on web page.

To demonstrate how to add a Google Map to a web page use basic HTML page.
<h1>First Google Map</h1>
<div id="map">google map</div>

Set  Size of Map
<div id="map" style="width:400px;height:400px">

Creating a Function to Set The Map Properties
function myMap()
 var mapOptions = {
center: new google.maps.LatLng(51.5, -0.12),
 zoom: 10,
 mapTypeId: google.maps.MapTypeId.HYBRID
var map = new google.maps.Map(document.getElementById("map"), mapOptions);
mapOptions variable defines the properties for the map. 
center property specifies where to center the map.
zoom property specifies the zoom level for the map .
Add the Google Maps API
<script src="https://maps.googleapis.com/maps/api/js?callback=myMap">
Google Map
HTML Graphics
Tech writer at newsandstory
Total 505 views