Source Code:
(back to article)
Submit
Result:
Report an issue
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyA3XfuMJJGzaU8TUItQM7XWD4esZdbpgtA"></script> <script> var map; function initialize() { var prop = { center:new google.maps.LatLng(51.508742,-0.120850), zoom:5, mapTypeId:google.maps.MapTypeId.ROADMAP }; return new google.maps.Map(document.getElementById("w3docs-map"), prop); } setTimeout(function(){ map = initialize(); },500); function w3Load(){ document.getElementById("w3docs-map").style.display = 'block'; google.maps.event.trigger(map, 'resize'); } </script> </head> <body> <div id="w3docs-map" style="width:500px;height:380px;display: none"></div> <button onclick="w3Load()">Charger la Carte</button> </body> </html>