File tree Expand file tree Collapse file tree
src/plugins/region_map/public Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,7 +286,8 @@ CORS configuration of the server permits requests from the Kibana application on
286286 showAllData ,
287287 meta ,
288288 layerConfig ,
289- serviceSettings
289+ serviceSettings ,
290+ leaflet
290291 ) {
291292 const clonedLayer = new ChoroplethLayer (
292293 name ,
@@ -295,7 +296,8 @@ CORS configuration of the server permits requests from the Kibana application on
295296 showAllData ,
296297 meta ,
297298 layerConfig ,
298- serviceSettings
299+ serviceSettings ,
300+ leaflet
299301 ) ;
300302 clonedLayer . setJoinField ( this . _joinField ) ;
301303 clonedLayer . setColorRamp ( this . _colorRamp ) ;
Original file line number Diff line number Diff line change @@ -170,27 +170,29 @@ export function createRegionMapVisualization({
170170 }
171171
172172 async _recreateChoroplethLayer ( name , attribution , showAllData ) {
173+ const selectedLayer = await this . _loadConfig ( this . _params . selectedLayer ) ;
173174 this . _kibanaMap . removeLayer ( this . _choroplethLayer ) ;
174175
175176 if ( this . _choroplethLayer ) {
176177 this . _choroplethLayer = this . _choroplethLayer . cloneChoroplethLayerForNewData (
177178 name ,
178179 attribution ,
179- this . _params . selectedLayer . format ,
180+ selectedLayer . format ,
180181 showAllData ,
181- this . _params . selectedLayer . meta ,
182- this . _params . selectedLayer ,
183- await getServiceSettings ( )
182+ selectedLayer . meta ,
183+ selectedLayer ,
184+ await getServiceSettings ( ) ,
185+ ( await lazyLoadMapsLegacyModules ( ) ) . L
184186 ) ;
185187 } else {
186188 const { ChoroplethLayer } = await import ( './choropleth_layer' ) ;
187189 this . _choroplethLayer = new ChoroplethLayer (
188190 name ,
189191 attribution ,
190- this . _params . selectedLayer . format ,
192+ selectedLayer . format ,
191193 showAllData ,
192- this . _params . selectedLayer . meta ,
193- this . _params . selectedLayer ,
194+ selectedLayer . meta ,
195+ selectedLayer ,
194196 await getServiceSettings ( ) ,
195197 ( await lazyLoadMapsLegacyModules ( ) ) . L
196198 ) ;
You can’t perform that action at this time.
0 commit comments