API
From MapbenderWiki
This pagee describes the current state of the Mapbender API
Contents |
Introduction
Mapbender has two APIs, one for JavaScript and another one on the server side.
JavaScript API
All global functions of Mapbender modules that are global can be used by other modules. Theses functions make up the JavaScript API of Mapbender.
Event Manager
All modules need to register at the Mabender event manager to be able to be notified of status changes in other modules.
This list of events can be used as a basis for further development. So far it looks like all objects could do with the same methods: add, delete, update, read(?) ...which is nothing but basic CRUD again.
Map-Context (state of the application)
- add layer
- delete layer
- (update layer -> geometry changed)
- Zoom (in, out, back?, all?)
- pan
Layer Events
- add feature
- delete feature
- select / deselect feature (reference to: set of features)
- add filter
- delete filter
- delete all filters
Featue events (attribute events?)
- add attribute
- delete attribute
- attribute values changed
- hover feature (?)
- feature info (WMS FeatureInfo?)
- selected attribute changed(?)
Layer-representation events(?)
- add thematic layer
- delete thematic layer
- update thematic layer
- (propagate thematic layer?)
Modules must be able to register with the Event Manager:
- register module (self)
- unregister module (self)
- notify of event (see list)
- receive notification from other module
Server API
Currently there is no explicit documented server side API.
It might make sense to make some server functions available through an API. There are some wrappers in the GSoC 2009 project that could be used for a RESTful API.
