Google Maps Tutorial






<!--
main_leaderboard, all: [728,90][970,90][320,50][468,60]
-->



Google Maps Tutorial



❮ Previous
Next ❯



Google Maps API


This tutorial is about the Google Maps API (Application
Programming Interface).



An API is a set of methods and tools that can be used for building software applications.



Google Maps API allows you to display maps on your web site:




function myMap()
{
var mapProp= {
center:new google.maps.LatLng(51.508742,-0.120850),
zoom:5,
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
}


Google Maps in HTML


This example creates a Google Map in HTML:



Example



<!DOCTYPE html>
<html>
<body>

<h1>My First Google Map</h1>

<div id="googleMap" style="width:100%;height:400px;"></div>

<script>
function myMap() {
var mapProp= {
    center:new
google.maps.LatLng(51.508742,-0.120850),
    zoom:5,
};
var map=new google.maps.Map(document.getElementById("googleMap"),mapProp);
}
</script>

<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY&callback=myMap"></script>

</body>
</html>

Try it Yourself »




❮ Previous
Next ❯

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?