Maps API v3 base map
by upsidown
HTML
<script src="//maps.googleapis.com/maps/api/js?key=AIzaSyCkUOdZ5y7hMm0yrcCQoCvLwzdM6M8s5qk"></script>
<!-- Credits for this code example: @MrUpsidown https://stackoverflow.com/users/1238965/mrupsidown -->
<div id="map-canvas"></div>
CSS
#map-canvas {
height: 400px;
}
JavaScript
function initialize() {
var myLatLng = new google.maps.LatLng(46.2,6.17);
var mapOptions = {
zoom: 4,
center: myLatLng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
var marker = new google.maps.Marker({
position: myLatLng,
map: map
});
}
initialize();