mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Should correctly handle zoom level 0 (#10017)
The map service manifest now indicates that map zoom levels range from 0->12, where as previously they ranged from 1->10. This revealed a bug in Kibana where zoom level 0 was not accurately handled. The bug was there pre- 5.2, but was only triggered due to the config change in the map manifest.
This commit is contained in:
parent
d946326ec7
commit
cfacf0e912
1 changed files with 2 additions and 2 deletions
|
@ -43,9 +43,9 @@ export default function MapFactory(Private, tilemapSettings) {
|
|||
this._attr = params.attr || {};
|
||||
|
||||
const { minZoom, maxZoom } = tilemapSettings.getMinMaxZoom(this._isWMSEnabled());
|
||||
this._mapZoom = Math.max(Math.min(params.zoom || defaultMapZoom, maxZoom), minZoom);
|
||||
const zoom = typeof params.zoom === 'number' ? params.zoom : defaultMapZoom;
|
||||
this._mapZoom = Math.max(Math.min(zoom, maxZoom), minZoom);
|
||||
this._mapCenter = params.center || defaultMapCenter;
|
||||
|
||||
this._createMap();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue