mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
This commit is contained in:
parent
066ab863f3
commit
3573807ea1
1 changed files with 3 additions and 1 deletions
|
@ -185,7 +185,9 @@ export class MBMapContainer extends React.Component {
|
|||
new mapboxgl.LngLat(clamp(goto.bounds.min_lon, -180, 180), clamp(goto.bounds.min_lat, -89, 89)),
|
||||
new mapboxgl.LngLat(clamp(goto.bounds.max_lon, -180, 180), clamp(goto.bounds.max_lat, -89, 89)),
|
||||
);
|
||||
this._mbMap.fitBounds(lnLatBounds);
|
||||
//maxZoom ensure we're not zooming in too far on single points or small shapes
|
||||
//the padding is to avoid too tight of a fit around edges
|
||||
this._mbMap.fitBounds(lnLatBounds, { maxZoom: 17, padding: 16 });
|
||||
} else if (goto.center) {
|
||||
this._mbMap.setZoom(goto.center.zoom);
|
||||
this._mbMap.setCenter({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue