Skip to content

Commit

Permalink
Fix coordinate maps layers dropdown (elastic#70609)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Caldwell committed Jul 14, 2020
1 parent 3f17aef commit ea2f3e8
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/legacy/core_plugins/tile_map/public/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ import 'angular-sanitize';
import { createTileMapFn } from './tile_map_fn';
// @ts-ignore
import { createTileMapTypeDefinition } from './tile_map_type';
import { getBaseMapsVis, MapsLegacyPluginSetup } from '../../../../plugins/maps_legacy/public';
import {
getBaseMapsVis,
IServiceSettings,
MapsLegacyPluginSetup,
} from '../../../../plugins/maps_legacy/public';

/** @private */
interface TileMapVisualizationDependencies {
uiSettings: IUiSettingsClient;
getZoomPrecision: any;
getPrecision: any;
BaseMapsVisualization: any;
serviceSettings: IServiceSettings;
}

/** @internal */
Expand All @@ -61,12 +66,13 @@ export class TileMapPlugin implements Plugin<Promise<void>, void> {
core: CoreSetup,
{ expressions, visualizations, mapsLegacy }: TileMapPluginSetupDependencies
) {
const { getZoomPrecision, getPrecision } = mapsLegacy;
const { getZoomPrecision, getPrecision, serviceSettings } = mapsLegacy;
const visualizationDependencies: Readonly<TileMapVisualizationDependencies> = {
getZoomPrecision,
getPrecision,
BaseMapsVisualization: getBaseMapsVis(core, mapsLegacy.serviceSettings),
uiSettings: core.uiSettings,
serviceSettings,
};

expressions.registerFunction(() => createTileMapFn(visualizationDependencies));
Expand Down

0 comments on commit ea2f3e8

Please sign in to comment.