Description
This sample shows a GeoRSS viewer implemented as a custom task. This sample demonstrates writing a custom task, providing
metadata
for a task with task info, handling task results, and provding action item for the task results. The sample builds on top
of the web mapping application.
The task reads a GeoRSS url and draws the points as webgraphics on top of the map. By default the sample uses the url "http://earthquake.usgs.gov/recenteqsww/catalogs/eqs7day-M2.5.xml".
this url returns recent earthquake locations around the world for the past seven days with magnitude greater thatn 2.5.
The attribute information of the earthquake locations can be accessed by selecting them using the select tool. Click on
one of the result item to see the details in the results details panel.
Highlight a location from the context menu by right clicking on the result item and selecting highlight. Create and deploy
the sample by followiung the steps below.
Example Code
Code for this example is located in
ArcGISInstall/java/samples/server/webadf.custom_task
Instructions
- Open a command window.
- Navigate to the folder containing the build.xml file.
- Type arcgisant build.Note: The location %ARCGISHOME%/java/tools/ant/bin should be in your system path.
- Provide response to the input prompt with relevant connection information. The sample can use any of the supported servcice
types.
- The web application for the sample will be created under the folder called build.
- Deploy the web application in any supported servlet engine or application server.
- After deployment access the sample by typing the URL (e.g. http://[host]:[port]/[samplename]) in a web browser. The default
name for the sample is "georssviewer".
Files
- mapviewer.jsp -- The main page with the map and task
- GeorssTask.java -- Java class for the task
- GeorssTaskInfo.java -- Java class for the task metadata
- GeorssTaskResults.java -- Java class for the task results with action methods
- faces-config.xml -- Configuration file that describes the resources and functionalities for the application
Products
Server
Platforms
Windows, Solaris, and Linux