Last active
April 26, 2019 01:35
-
-
Save Pessimistress/7cd1d7eab1a88a9672a9d292cc9f7aaa to your computer and use it in GitHub Desktop.
deck.gl GoogleMapsOverlay Code Sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script src="https://unpkg.com/deck.gl@^7.0.0/dist.min.js"></script> | |
<script src="https://maps.googleapis.com/maps/api/js?key=<google_maps_api_key>&libraries=visualization&v=3.34"></script> | |
<style type="text/css"> | |
body {margin: 0; padding: 0;} | |
#container {width: 100vw; height: 100vh;} | |
</style> | |
</head> | |
<body> | |
<div id="container"></div> | |
</body> | |
<script type="text/javascript"> | |
const map = new google.maps.Map(document.getElementById('container'), { | |
center: {lat: 51.47, lng: 0.45}, | |
zoom: 5 | |
}); | |
const deckOverlay = new deck.GoogleMapsOverlay({ | |
layers: [ | |
... | |
] | |
}); | |
deckOverlay.setMap(map); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment