Published
Edited
Jun 10, 2020
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const { qdtCompose, QdtMapBox } = QdtComponents;
qdtCompose({
element,
component: QdtMapBox,
app,
options: {
height: 400,
center: [-140, 50],
zoom: 4,
pitch: 90,
antialias: true,
interactive: true,
scrollZoom: true,
boxZoom: false,
dragRotate: true,
dragPan: true,
keyboard: false,
doubleClickZoom: false,
touchZoomRotate: false,
handleMapCallback: ({ map }) => {
map.flyTo({
center: [-94.39962116967581, 40.61298086159351],
zoom: 3,
bearing: -8,
speed: 0.6,
curve: 1,
pitch: 58,
easing(t) {
return t;
},
essential: true,
});
},
},
properties: {
qHyperCubeDef: {
qDimensions: [
{ qDef: { qFieldDefs: ['ID'] } },
{ qDef: { qFieldDefs: ['lat'] } },
{ qDef: { qFieldDefs: ['lon'] } },
{ qDef: { qFieldDefs: ['gender'] } },
],
qMeasures: [],
qInitialDataFetch: [{
qWidth: 4,
qHeight: 2500,
}],
},
}
});
}
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