Commit 0869d678 authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

Update locations

parent 00a29332
This diff is collapsed.
...@@ -987,12 +987,12 @@ const makeBaseMap = () => { ...@@ -987,12 +987,12 @@ const makeBaseMap = () => {
flowMapLayer = L.canvasFlowmapLayer(data, { flowMapLayer = L.canvasFlowmapLayer(data, {
// Define origins and destination from json values // Define origins and destination from json values
originAndDestinationFieldIds: { originAndDestinationFieldIds: {
originUniqueIdField: "id_orig", originUniqueIdField: "id_origen",
originGeometry: { originGeometry: {
x: "xo", x: "xo",
y: "yo" y: "yo"
}, },
destinationUniqueIdField: "id_dest", destinationUniqueIdField: "id_destino",
destinationGeometry: { destinationGeometry: {
x: "xd", x: "xd",
y: "yd" y: "yd"
...@@ -1127,8 +1127,8 @@ const makeBaseMap = () => { ...@@ -1127,8 +1127,8 @@ const makeBaseMap = () => {
pane: "pane_flujos" pane: "pane_flujos"
}).bindTooltip( layer => { // what to display on hover }).bindTooltip( layer => { // what to display on hover
let coords = layer.getLatLng(); let coords = layer.getLatLng();
let label = od.features.filter( f => f.properties.X == coords.lng && f.properties.Y == coords.lat); let label = od.features.filter( f => f.properties.lng == coords.lng && f.properties.lat == coords.lat);
return label[0].properties.CMCP; return label[0].properties.nombre;
}); });
flowMapLayer.addTo(map); flowMapLayer.addTo(map);
// hack to get origins and destinations in desired map pane // hack to get origins and destinations in desired map pane
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment