How to use
See How to use ArcGIS samples for help running the sample.
Working with Multiple WebControls
- This sample shows how to add two maps and two tool tasks into a WebADF Java 10.0 application. The two map contexts are declared in the JSP page. The second mapcontext and its toolbar managed bean are declared in a separate xml file and added to web.xml. The sample displays two maps and each map has its own toolbar. Each toolbar only interacts with the corresponding map.
- Create and start an ArcGIS map server object. You may use any data, map configuration file, and server object name. If you wish to match the Web application in the Developer Help, create a server object named 'usa' from the map configuration file at %AGSDEVKITJAVA%\java\samples\data\mxds\usa.mxd. (This difference is seen in the faces-config.xml file and the map's appearance.)
- There are two ways to build the sample. You can either use ArcGIS Ant or Eclipse plugin. To use Ant, at command line, browse to %AGSDEVKITJAVA%\java\samples\workingWithMultipleWebControls, type arcgisant build, follow the command prompt to finish the build. There will be a directory called build under the sample root folder, inside there will be a war file. Deploy the war file into Tomcat.
- The other way to build the sample is to use Eclipse. Open Eclipse, File - New Project - ESRI Templates - Web ADF Samples.
- Choose the Working with Multiple WebControls
- Go through the wizard to finish building the sample.
- Run the sample web application on server.
- You can also export the application as war file and deploy to other supported application server.
- Open http://<host>:<port>/<appname>/map.jsf
- The application will open with 2 map tools tasks and 2 map controls
- You can interact with the map controls individually, without affecting the extent and information on the 2nd map.
Development licensing | Deployment licensing |
---|---|
Server | Server |