Thursday, October 10, 2013

GEOG.455 LAB 3 ArcGIS Flex Viewer


Goal and Background

This lab is an introduction to creating web based GIS applications. The primary platform for application construction will be the ArcGIS Flex Application Builder. The ArcGIS Application Builder is great for creating easy to use and highly customizable web map applications. The lab will demonstrate how to configure Flex XML and custom web widgets using XML scripting.

Methods

By using ArcGIS Flex Viewer, it is easy to create an application and start configuring immediately. As soon as the application is given a name and save location, the builder displays many options for applying basemaps, operational layers, and map extent. These three features will create the backbone for our web application and will influence how the application will operate.


After the basemap is chosen, operational layers can be added to display different types of data. These operational layers can be further configured so that only certain fields are displayed in the application. In this example, our map will be displaying census block data from 2000, but only data for population, households, and housing units will be shown in the pop-up windows for the operational layer.




By previewing our application inside of the ArcGIS Flex Viewer, we can determine that the process was successful since the pop-up window only displays data for the three specified fields.




In order to add more functionality and interactivity to the map application, widgets can be added. ArcGIS Flex Viewer provides us with a catalog of widgets, but it is also possible to edit and even create our own. In this example, we added the locator widget which pinpoints locations after the address has been typed in the search bar. We also configured the draw tool so that it can perform measuring operations when a line is drawn over a distance.






Widgets can also be added and customized by altering the configuration files of the ArcGIS Flex Application Builder. In this case, we are going to create an xml configuration file for a chart widget that will display census data in a bar graph. Using Notepad++, we can construct the following script for the widget.




The final step for adding the widget is to open the configuration files for the application and insert a code that will reference the new script for the widget. When executed correctly, the chart widget will appear in the map application and follow the rules that were written in the script. By using the draw tools to select census blocks, the tool will then calculate and compare the data for population, households, and housing units.




The last portion of this lab demonstrated how to create a widget from within the Flex Application Builder. As long as you have the proper configuration files and logo images compressed in a folder, the application builder makes it very simple to import data for constructing widgets. The configuration files can be found at the bottom of the widgets page and can be edited by selecting the pencil icon below each widget. Once the desired preferences are fine-tuned, the widget will become usable under the preview tab.

Sources




No comments:

Post a Comment