Adding plugins to Dalliance

Dalliance has a number of extension points aimed at baking it easier to customize the browser and better integrate it with your application. If you can't find what you need, please ask!

Feature info plugins

Feature Info plugins are run whenever the default feature-info box gets displayed (usually when the user clicks on a feature, unless this behaviour has been over-ridden). They are able to add extra rows to the feature-info box. A minimal example is:
browser.addFeatureInfoPlugin(function(f, info) {
    info.add('Testing', 'This is a test!');
You can add either strings (as above) or DOM elements. If you want to add information which isn't yet available (e.g. because you need to perform an AJAX request or other asynchronous operation to get hold of it), the simplest thing to do is to add an empty div element then populate it once the data arrives

Feature listeners

View listeners

Source adapters