CoolMap Plugin Development

  1. 1. Get a distributed version of CoolMap. Then in its folder, you should find CoolMap.jar, and a plugin folder.
  2. 2. Create a new Java project. Import ‘CoolMap.jar’ as a dependency.
Your source package must have a class, say com.example.testplugin.impl.[PLUGINCLASS].java which is annotated by PluginImplementation and implements CoolMapPlugin interface.
public class PLUGINCLASS implements CoolMapPlugin 
{ ... } 
  1. 3. Put initializing code into void initialize(JSONOBject config) to override the function of CoolMapPlugin interface. Then Implement functions of your own plugin and add them back to CoolMap menu in initialize method.
  2. 4. Refer to CoolMap Java Doc for detailed CoolMap core data structures and methods to use in your plugins.
  3. 5. Build the project to generate a jar file of your plugin.
  4. 6. Place the folder which contains your plugin jar under the CoolMap 'plugin' folder, and rename the folder as [testplugin].plugin.