Published
Edited
Nov 27, 2020
Insert cell
Insert cell
Insert cell
Insert cell
{
// I like this design pattern, what do you think ?
// too bad you can't make a function out of it :/
const markers = points.map(v => createMarker(v).addTo(map));
invalidation.then(() => {
markers.map(m => m.remove());
});

return md`~~~js
f(map, points) => void // add markers to map
~~~`;
}
Insert cell
Insert cell
Insert cell
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