Use maps plugin in custom plugin

hi everyone, i want to use maps plugin features in my plugin, how i do it ?


x-pack/data_visualizer plugin provides a good example of using the MapEmbeddable to display a map. The relevant file to look at is

embeddablePlugin.getEmbeddableFactory(MAP_SAVED_OBJECT_TYPE) gets the MapEmbeddable factory from embeddablePlugin. To use the embeddablePlugin in your plugin, make sure "embeddable" is included in your plugin kibana.json file under requiredPlugins.

Hopefully this helps. Also, we have this open issue that hopes to expose a react component so plugin authors like you don't have to worry about low level embeddable factory stuff. Please comment as to how you would like to consume a Map component in your plugin.

1 Like