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:
Thomas Neirynck 2017-01-23 16:17:22 -05:00 committed by GitHub
parent d946326ec7
commit cfacf0e912

View file

@ -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();
}