Align zoom level settings (#11399)

- allow 0-level for WMS services
- use zoom level 2, centered at 0,0 as new default when tilemap viz opens
This commit is contained in:
Thomas Neirynck 2017-04-25 23:02:39 -04:00 committed by GitHub
parent 55ba578a1e
commit 984aaa80cf
3 changed files with 7 additions and 4 deletions

View file

@ -29,7 +29,7 @@ export default function TileMapVisType(Private, getAppState, courier, config) {
heatBlur: 15,
heatNormalizeData: true,
legendPosition: 'bottomright',
mapZoom: 0,
mapZoom: 2,
mapCenter: [0, 0],
wms: config.get('visualization:tileMap:WMSdefaults')
},

View file

@ -159,11 +159,9 @@ uiModules.get('kibana')
* @return {{maxZoom: (*|number), minZoom: (*|number)}}
*/
getMinMaxZoom(isWMSEnabled) {
//for backward compatibilty, we preserve the 1-18 setting. https://git.io/vMn5o
if (isWMSEnabled) {
return {
minZoom: 1,
minZoom: 0,
maxZoom: 18
};
}

View file

@ -57,6 +57,11 @@ export default function ({ getService, getPageObjects }) {
return PageObjects.visualize.collapseChart()
.then(function () {
//level 1
return PageObjects.visualize.clickMapZoomOut();
})
.then(function () {
//level 0
return PageObjects.visualize.clickMapZoomOut();
})
.then(function () {