Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AdrianGimenez/ab9220ae9b0c1e0f31a89ad333da0a37 to your computer and use it in GitHub Desktop.
Save AdrianGimenez/ab9220ae9b0c1e0f31a89ad333da0a37 to your computer and use it in GitHub Desktop.
MAP JavaScript
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8">
<!--Importo les llibreries del mapa-->
<script src="http://maps.googleapis.com/maps/api/js"></script>
<!--Inicialitzo el mapa-->
<script>
function initialize() {
/*Propietats del mapa*/
var mapProp = {
center:new google.maps.LatLng(41.150763, 1.099832),
zoom: 7,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
/*objecte mapa*/
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:500px;height:380px;"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment