should always set base layer (#16213)

This commit is contained in:
Thomas Neirynck 2018-01-23 10:03:10 -05:00 committed by GitHub
parent cb7b38bb69
commit 2f3311f523
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,7 +7,7 @@ import 'ui/vis/map/service_settings';
const MINZOOM = 0;
const MAXZOOM = 18;
export function BaseMapsVisualizationProvider(Private, serviceSettings) {
export function BaseMapsVisualizationProvider(serviceSettings) {
/**
* Abstract base class for a visualization consisting of a map with a single baselayer.
@ -173,16 +173,15 @@ export function BaseMapsVisualizationProvider(Private, serviceSettings) {
if (this._kibanaMap.getZoomLevel() > tmsLayer.maxZoom) {
this._kibanaMap.setZoomLevel(tmsLayer.maxZoom);
}
const url = tmsLayer.url;
const options = _.cloneDeep(tmsLayer);
delete options.id;
delete options.url;
this._kibanaMap.setBaseLayer({
baseLayerType: 'tms',
options: { url, ...options }
});
}
const url = tmsLayer.url;
const options = _.cloneDeep(tmsLayer);
delete options.id;
delete options.url;
this._kibanaMap.setBaseLayer({
baseLayerType: 'tms',
options: { url, ...options }
});
}
async _updateData() {