Public
Edited
Mar 7, 2023
3 forks
3 stars
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
config = {
const cfg = {
edgeWeight: "time",
maxEdgeWeight: maxTime,
sources: [
{
id: "source1",
lat: mapMarker.lat,
lng: mapMarker.lng,
tm: {
bike: {}
}
}
],
polygon: {
values: [maxTime],
serializer: "geojson",
srid: 4326,
buffer: 0.0001,
quadrantSegments: 5
}
};
if (exclude && exclusionPolygon.features.length > 0) {
cfg.exclusionGeometry = {
crs: 4326,
data: exclusionPolygon
};
}
return cfg;
}
Insert cell
Insert cell
routeConfig = {
const cfg = {
edgeWeight: "time",
maxEdgeWeight: "3600",
pathSerializer: "geojson",
polygon: { srid: 4326 },
sources: [
{
id: "source1",
lat: mapMarker.lat,
lng: mapMarker.lng,
tm: {
bike: {}
}
}
],
targets: [
{
id: "target1",
lat: targetMarker.lat,
lng: targetMarker.lng
}
]
};
if (exclude && exclusionPolygon.features.length > 0) {
cfg.exclusionGeometry = {
crs: 4326,
data: exclusionPolygon
};
}
return cfg;
}
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
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