Skip to content
Snippets Groups Projects
Commit f3c55560 authored by ncastejon's avatar ncastejon
Browse files

Fix flyTo when click on the map

parent a40009d0
No related branches found
No related tags found
1 merge request!51Fix flyTo
Pipeline #1765 passed
...@@ -172,7 +172,14 @@ export class MapService { ...@@ -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 // 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 // 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) // 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 { ...@@ -503,7 +510,6 @@ export class MapService {
// left, half on the right) // left, half on the right)
offset: new mapboxgl.Point(-70, 0), offset: new mapboxgl.Point(-70, 0),
}, },
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment