[Mapbender-dev] Application element interaction

Marc Manns marcmanns at gmx.de
Wed Mar 24 14:58:34 EDT 2010


Christoph Baudson (Wheregroup) schrieb:
> Hello folks,
>
> Karim and I had been discussing how application elements could 
> interact in the future. We wanted to establish a more user friendly 
> way of configuring how elements collaborate. Based on that discussion 
> I have made a prototypical implementation.
>
> The scenario consists of two elements, a button for digitizing a 
> polygon, and a feature list. I want the feature list to automatically 
> display the polygons that are being digitized, without having to 
> change the source code.
>
> I have added an element var "inputs" for the feature list, which looks 
> like this:
>
> [{
>        "type": "featureCollection",
>        "method": "addFeatureCollection",
>        "title": "Features that will be added to the feature list",
>        "linkedTo": [
>            {
>                "id": "mb_digitize_polygon",
>                "event": "finished",
>                "attr": "featureCollection",
>            }
>        ]
> }]
>
> This JSON snippet specifies that the feature list has an input of a 
> specific "type" ("featureCollection"), and input data can be added via 
> an API "method" ("addFeatureCollection").
>
> This input is then linked to the output of the polygon digitizer, 
> specified by "id". The output is generated whenever an "event" is 
> triggered ("finished"), and the listener can access the output via the 
> attribute "attr" ("featureCollection") of the object passed into the 
> callback.
>
> With this approach, we can create very flexible configurations. I 
> imagine an admin UI similar to Yahoo Pipes, where you can connect your 
> elements by drawing a line from element A to B, complete with default 
> settings and validation. The JSON above would be generated automatically.
>
> Thanks to the Mapbender API the code necessary to do this is only 
> about 20 lines [1], there is no need to add code to existing elements.
>
> What do you think about this approach? I think it would be a great 
> feature and make configurations very easy, and it would also give 
> element designers a structure to code to. I would love to have that in 
> Mapbender 3.x, maybe for FOSS4G.
>
> Christoph
>
> [1] http://osgeo.pastebin.com/0SwNFUvU
>
Looks very promising.
I would love to get an easier (more user friendly) way to acces 
mapbender's modules.
+1 from me :-)

regards Marc


More information about the Mapbender_dev mailing list