The Micello Javascript API is highly extensible. In the interest of keeping the core API code small, many additional features will now be developed as plugins. This allows developers to share, fork, and improve new features with a standardized format.

Including Plugin Javascript Files
After selecting your plugin of choice, the first step to using it is to include it's javascript file within the <head> tag of your HTML document.

Plugins take advantage of the Micello Javascript API and for this reason are built upon the class structure of the API. This means that the Javascript API must be loaded before a plugin:

    <!-- Load API first -->
    <script type="text/javascript" src=""></script>
    <!-- Load plugin after -->
    <script src="path/to/plugin"></script>

Most plugins should be initialized at the time the map is loaded, but more specific instructions may be included in the documentation on the plugin's page. Generally the following steps will get the job done:

1) One - Create a new instance of the plugin.

2) Two - Optionally configure the plugin.

3) Three - Register the plugin with the API. This step is necessary for all the API classes to be available to the plugin.

4) Four - Call the plugin's 'initialize' method

    function mapInit() {
        var mapControl = new micello.maps.MapControl('mapElement');
        var mapDataObject = mapControl.getMapData();
    //    1) Create an instance of the plugin
        Directory = new micello.maps.Directory;
    //    2) Optionally set configuration constants here
        Directory.DIRECTORY_UI_POSITION = "right top";
    //    3) Register the plugin with the API
    //    4) Initialize the plugin

Plugins are highly configurable and editing the source code is encouraged. If it seems like a feature is missing, feel free to add it.