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

Reply via email to