Yes, what you want to do is achievable, possibly with modifications depending on whether existing functionality works for you.
Have a look at the examples. http://demo.communitymapbuilder.org/ In particular: http://demo.communitymapbuilder.org/demo/mapbuilder-lib-1.5-alpha1/demo/wfs-t/index.html Allows you to insert, delete, query features on a map. http://demo.communitymapbuilder.org/demo/mapbuilder-lib-1.5-alpha1/demo/OWSExplorer/index.html Allows you to add/remove layers And you want to extend existing functionality, I suggest looking at the design: http://communitymapbuilder.org/display/MAP/Design which explains how events can be used to detect changes (using the Model View Controller design pattern). Also there is useful info in Tutorials: http://communitymapbuilder.org/display/MAP/Tutorials Kent B Kvarfordt wrote: > > I am currently evaluating MapBuilder and geoserver for an upcoming > project I am working on. > > I need the ability to add and delete map layers dynamically during > runtime. At a really high level, I envision the flow something like > the following: > > Add Layer: > 1. client side: a user clicks a button to plot a feature on > the map > 2. client side: the onclick event is captured, and an AJAX > call to geoserver is made to retrieve the feature > 3. client side: dynamically via Javascript, the feature is > added to the map and the legend is updated > > Remove Layer: > 1. client side: a user clicks a button to remove a feature > form the map > 2. client side: the onclick event is captured, and the feature > is programmatically removed from the map and the legend is updated. > > Questions: > * For the AJAX call, I assume I use a URL like the following > where type name is the name of the feature I want to retrieve. > > http://localhost/geoserver/wfs?request=getfeature&service=wfs&version=1.0.0&typename=WorldCountries > > > * Once I have the returned XML how do I add it to the map? Do > I use MapPane.addLayer and MapPane.deleteLayer? If so, what are the > two parameters and how do I get them? > * If I have the legend widget hooked up, does it listen for > add/delete layer events and automatically update or do I need to do > this myself? > * Or, I am so far off the mark I don't even warrant a reply? :-) > > Any code snippets or a tutorial in this area to get me going would be > great. > > TIA, > -- kent > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > ------------------------------------------------------------------------ > > _______________________________________________ > Mapbuilder-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mapbuilder-users > -- Cameron Shorter Systems Architect, http://lisasoft.com.au Tel: +61 (0)2 8570 5050 Mob: +61 (0)419 142 254 ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Mapbuilder-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mapbuilder-users
