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;
}