Login
Your Email
Pasword
Home
Write
Trending
History
Liked
Dashboard

How to display HTML Google Maps?

Google Maps allows to display maps on web page.

Do you have similar website/ Product?
Show in this page just for only $2 (for a month)
Create an Ad
0/60
0/180
To demonstrate how to add a Google Map to a web page use basic HTML page.

First Google Map


google map





Set  Size of Map

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