POLAR reference
    Preparing search index...

    Function addPlugin

    • Before instantiating the map, all required plugins have to be added. Depending on how you use POLAR, this may already have been done. Ready-made clients (that is, packages prefixed @polar/client-) come with plugins prepared.

      You may add further plugins or proceed with createMap.

      Please note that the order of certain plugins is relevant when other plugins are referenced, e.g. @polar/plugin-gfi's coordinateSources requires the configured sources to have previously been set up.

      In case you're integrating new plugins, call addPlugin with a plugin instance.

      If you want to add multiple plugins at once, you can use addPlugins instead.

      Parameters

      • map: any

        Map to add the plugin to.

      • plugin: PluginContainer

        Plugin to be added.

      Returns void

      addPlugin(Plugin(pluginOptions: PluginOptions))
      

      In case you're writing a new plugin, it must fulfill the following API:

      const Plugin = (options: PluginOptions): PluginContainer => ({
      id,
      component,
      locales,
      options,
      storeModule,
      })