mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
fixing map bounds (#25040)
This commit is contained in:
parent
359c852c76
commit
6f527618f5
1 changed files with 4 additions and 5 deletions
|
@ -21,7 +21,6 @@ import _ from 'lodash';
|
|||
import { i18n } from '@kbn/i18n';
|
||||
import { GeohashLayer } from './geohash_layer';
|
||||
import { BaseMapsVisualizationProvider } from './base_maps_visualization';
|
||||
import { AggConfig } from 'ui/vis/agg_config';
|
||||
import { TileMapTooltipFormatterProvider } from './editors/_tooltip_formatter';
|
||||
import { toastNotifications } from 'ui/notify';
|
||||
|
||||
|
@ -202,15 +201,15 @@ export function CoordinateMapsVisualizationProvider(Notifier, Private) {
|
|||
if (agg) {
|
||||
const searchSource = this.vis.searchSource.createChild();
|
||||
searchSource.setField('size', 0);
|
||||
searchSource.setField('aggs', function () {
|
||||
const geoBoundsAgg = new AggConfig(agg.vis, {
|
||||
searchSource.setField('aggs', () => {
|
||||
const geoBoundsAgg = this.vis.getAggConfig().createAggConfig({
|
||||
type: 'geo_bounds',
|
||||
enabled: true,
|
||||
params: {
|
||||
field: agg.getField()
|
||||
},
|
||||
schema: 'metric'
|
||||
});
|
||||
schema: 'metric',
|
||||
}, { addToAggConfigs: false });
|
||||
return {
|
||||
'1': geoBoundsAgg.toDsl()
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue