Skip to content

Commit f260585

Browse files
author
Aaron Caldwell
committed
Change how popup is instantiated and bound to map
1 parent 1a15294 commit f260585

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/plugins/maps_legacy/public/map/kibana_map.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import { EventEmitter } from 'events';
2121
import { createZoomWarningMsg } from './map_messages';
2222
import L from 'leaflet';
23+
import { ResponsivePopup } from 'leaflet-responsive-popup';
2324
import $ from 'jquery';
2425
import _ from 'lodash';
2526
import { zoomToPrecision } from './zoom_to_precision';
@@ -228,10 +229,10 @@ export class KibanaMap extends EventEmitter {
228229
}
229230

230231
if (!this._popup) {
231-
this._popup = L.responsivePopup({ autoPan: false });
232+
this._popup = new ResponsivePopup({ autoPan: false });
232233
this._popup.setLatLng(event.position);
233234
this._popup.setContent(event.content);
234-
this._popup.openOn(this._leafletMap);
235+
this._leafletMap.openPopup(this._popup);
235236
} else {
236237
if (!this._popup.getLatLng().equals(event.position)) {
237238
this._popup.setLatLng(event.position);

0 commit comments

Comments
 (0)