Published
Edited
Feb 2, 2018
1 fork
1 star
Insert cell
Insert cell
{
let div = html`<div style='height:400px;'></div>`;
// Like Leaflet and Mapbox GL JS, Google Maps is very picky about
// needing to be initialized on a div that's already included
// in the page. So I yield the div first, to establish it in
// the page.
yield div;
let map = new google.maps.Map(div, {
center: {lng:147.3, lat:-42.9},
zoom: 13
});
}
Insert cell
Insert cell
// This embeds my key. Get your own key - this one will be cycled out very soon!
google = require('https://maps.googleapis.com/maps/api/js?key=AIzaSyCe5LnXNbNwX5PZ6CJeNlDCdp__ixV6nzk')
.catch(() => window.google)
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more