How to use
See How to use ArcGIS samples for help on running the sample. If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.
Steps to Run Sample
- Open a command prompt and navigate into the samples root directory, e.g. $AGSDEVKITJAVA/java/samples/adf/webservicesmapviewer
- Run the Ant build task, from a command prompt, type > ant build
- This will create a deployable war file in the samples root directory
- Deploy webservicesmapviewer.war to your Java Application server and run the application in your internet browser.
- Enter the URL of known ArcGIS Server Map Service URL, for example, a map resource URL from ArcGIS Online resource center.
Import Sample into Eclipse 3.4.x (Ganymede)
- Source code is included in the war file generated in above steps so you can easily import in Eclipse to review the source and/or edit the application
- In Eclipse, select File > Import from the Eclipse toolbar
- Select Web\WAR file from the Select dialog
- Browse to the webservicesmapviewer.war file generated in above steps and accept the Web Project and Target Runtime selections
- Click Finish (You do not need to import the Web Libraries)
Import Sample into NetBeans v6.5.1
- Source code is included in the sample file structure so you can easily import into NetBeans
- In NetBeans, select File > New Project from the NetBeans toolbar
- Select 'Java Web' from the Categories left hand pane and 'Web Application from the Existing Sources' from the Projects right hand pane.
- Browse to the 'WebContent' directory in the sample root directory, e.g. $AGSDEVKITJAVA/java/samples/adf/webservicesmapviewer/WebContent
- Ensure the 'Existing Sources and libraries' dialog is appropriately populated
- Choose 'Delete' from the Warning dialog to delete the pre-compiled class files
Download the files for Java
MapView.jsp | Map Viewer |
Development licensing | Deployment licensing |
---|---|
Server | Server |