Just messing around with the Google Maps JavaScript API.
A Pen by Mark Hillard on CodePen.
Just messing around with the Google Maps JavaScript API.
A Pen by Mark Hillard on CodePen.
| <div id="map-canvas"></div> |
| var map; | |
| // initialize map | |
| function initMap() { | |
| map = new google.maps.Map(document.getElementById('map-canvas'), { | |
| zoom: 17, | |
| center: { | |
| lat: 32.752357, | |
| lng: -79.874714 | |
| }, | |
| backgroundColor: '#fcfcfc', | |
| scrollwheel: true, | |
| fullscreenControl: true, | |
| fullscreenControlOptions: true, | |
| rotateControl: true, | |
| rotateControlOptions: true, | |
| tilt: 45 | |
| }); | |
| var marker = new google.maps.Marker({ | |
| map: map, | |
| position: { | |
| lat: 32.752357, | |
| lng: -79.874714 | |
| }, | |
| title: 'Fort Sumter National Monument' | |
| }); | |
| } | |
| // load map | |
| google.maps.event.addDomListener(window, 'load', initMap); |
| <script src="//maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> |
| html,body,#map-canvas { height:100%; } |