Use maps plugin in custom plugin

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

thanks

x-pack/data_visualizer plugin provides a good example of using the MapEmbeddable to display a map. The relevant file to look at is https://github.com/elastic/kibana/blob/master/x-pack/plugins/data_visualizer/public/application/common/components/embedded_map/embedded_map.tsx

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

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.