Commit f3c55560 authored by ncastejon's avatar ncastejon
Browse files

Fix flyTo when click on the map

parent a40009d0
Pipeline #1765 passed with stages
in 10 minutes and 28 seconds
......@@ -172,7 +172,14 @@ export class MapService {
// 70 is the width of the dataset data details panel divided by 4 (by 2 because the map and the table
// share the remaining space and again by 2 because we want to center the point so there is half on the
// left, half on the right)
this._map.flyTo({ center: e.lngLat, curve: 1, speed: 0.4, offset: new mapboxgl.Point(-70, 0) });
this._map.panTo(e.lngLat, {
duration: 500,
// 70 is the width of the dataset data details panel divided by 4 (by 2 because the map and the table
// share the remaining space and again by 2 because we want to center the point so there is half on the
// left, half on the right)
offset: new mapboxgl.Point(-70, 0),
},
);
}
}
......@@ -503,7 +510,6 @@ export class MapService {
// left, half on the right)
offset: new mapboxgl.Point(-70, 0),
},
);
}
......
Supports Markdown
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