Get started with a browser using ArcGIS flex
For the browser that uses ArcGIS for flex, you can create a web map application of the geographic information system without programming. It allows you to configure and deploy Web Map applications conveniently and quickly.
This help topic describes how to start using the ArcGIS flex application viewer. First, ensure that the software requirements are met, and then download and set up the audience according to the instructions. I reviewed the browser application (default appearance) and practiced some configurations, such as modifying the main aspects of the browser for elements: title, color, and MAP range. Finally, add new features to the browser (by adding a widget) and some custom data content (by adding a Web Service ).
Requirements:
Download encapsulation options:
Two download packages are available:
- Compile package-this download package does not include source code, but has been compiled and ready for use.
- Uncompiled software package-this download package includes the source code of the viewer application. You will need to compile to use it.
Only one download package is the flex ArcGIS browser that needs to be installed and used. The compiled package is for users who intend to create custom web application ing by configuring the xml configuration file of the browser. The uncompiled package is an application for developers who intend to create custom components and/or expand the core browser. Determine which package meets your business flow and follow the instructions below.
Part 1. Download the ArcGIS browser of the Flex package
- Click Download link in the downloaded package on the website, agree to the ESRI signature and license agreement, and then click Download and save it anywhere on your computer.
- Decompress the downloaded package file to create a new folder named flexviewer.
Put the flexviewer folder in the web server folder of the machine. The actual folder location may vary depending on the configuration of your Web server. However, when using IIS, the default value is "C:/inetpub/wwwroot ".
Note:You need the permission to write this folder. Depending on your operating system and user permissions, you may ask your system administrator for assistance.
When you try to save a file in C:/inetpub/wwwroot, you may get an error especially in Windows 7 and Windows Vista: "You have no permission to save it in this folder ". In this case, even if you are an administrator on a machine. This is because Windows 7 (and Vista) (also known as UAC or user access/Account Control) with access control added tries to save the file in a protected folder (such as C: /inetpub/wwwroot ).
- Right-click the folder and select permissions.
- Go to the Security tab.
- Note that you only have read permission. Change to full access and Windows should not complain.
For more information, install Vista and IIS 7 on Windows.
- Open the web browser and enter the following URL to test the browser of the Flex application ArcGIS: http: // <machinename>/flexviewer/index.html. Replace <machinename> with the name of your computer (for example, http: // mymachinename/flexviewer/index.html ).
The browser for flex application ArcGIS should appear in your web browser. Displays some of the tag viewer applications for key user interface components (default appearance ):
By default, the viewer application has been pre-configured to reference multiple web services from arcgis.com, all of which are displayed on the list of Master display and map switching parts. Overview both map navigation and components have built-in browser user interfaces. The scale part is actually a map attribute, and it is not a separate component. (For example, additional GIS functions) other parts are included in the part tray at the top of the application.
Explore the existing browser for deploying the flex application ArcGIS with some of its functional tests. Once you are familiar with the application, continue to the next section to learn how to configure the browser.
Part 1. In practice, it is configured as browser 1 of flex ArcGIS. Search for files
Minimize Web browsers and navigate back to the flexviewer folder on your machine. (For example, C:/inetpub/wwwroot/flexviewer ). Expand a folder to view its content.
The flexviewer folder contains:
- Application folder-contains various samples in the localized configuration file.
- Asset folder-contains resource icons and graphics used by applications.
- Parts folder-contains parts used by applications.
- HTML wrapped webpage: default.htmand index.html (the default server is one of them when no file name is specified ).
- Main Application file: index.swf.
- Localized HTML packaging page: Index _ {XX} HTML.
- Two XML browser application configuration files: config. xml and configuration, all. xml.
- ESRI license agreement file: readme.txt file.
- Other flash Application Files: *. swz, * swfobject.js, and playerproductinstall.swf.
2. Change the name, identifier, and style color in config. xml
In a text editor such as NotePad or textpad, config. xml file. Leave the viewer application to open the web browser.
Change the title, subtitle, flag, and color XML from the value of this tag:
<Title> ArcGIS viewer for flex </title> <br/> <subtitle> A configurable web mapping application </subtitle> <br/> <logo> assets/images/logo.png </logo> <br/> <MCE: style> <! -- <Br/> <colors> 0 xffffff, 0x333333,0x101010,0x000000, 0xffd700 </colors> <br/> <alpha> 0.8 </alpha> <br/> --> </MCE: style> <style mce_bogus = "1"> <colors> 0 xffffff, 0x333333,0x101010,0x000000, 0xffd700 </colors> <br/> <alpha> 0.8 </alpha> </style>
In this way:
<Title> my Flex viewer </title> <br/> <subtitle> sample configuration </subtitle> <br/> <logo> assets/images/I _solar.png </logo> <br/> <MCE: style> <! -- <Br/> <colors> 0x000000, 0 xffffff, 0 xefefef, 0 xffffff, 0x000000 </colors> <br/> <alpha> 1.0 </alpha> <br/> --> </MCE: style> <style mce_bogus = "1"> <colors> 0x000000, 0 xffffff, 0 xefefef, 0 xffffff, 0x000000 </colors> <br/> <alpha> 1.0 </alpha> </style>
Save it in the config. xml file (but leave it open), and refresh the changes in the viewer application to observe what you just spoke.
Note: you may need to clear the cache to ensure the new version of the Web Browser file.
3. Change the initial scopeChanged so when the viewer application is opened, the map is scaled to the initial Space Range of the Australian map. Edit
Set the initialextent attribute of the tag:
<Map initialextent = "12042000-5619000 17795000-952000" Top = "40">Save it in the config. xml file (but leave it open), and refresh the changes in the viewer application to observe what you just spoke. The map of the browser should be enlarged to the new space range you specified.
Note: The spatial range is specified in the WGS 1984 network-assisted sphere mokto projection, because the base map and audience in ArcGIS are previewed in this prediction. If your web service is under different projection, you will have to change the projection where the initial degree of the browser application matches.
4. Add data as a business layer <Layer label = "boundaries and places" type = "tiled" visible = "true" <br/> url = "http://server.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer"/>Note: If this service is not running on the same web server, you will need a crossdomain. xml file of ArcGIS Server. If your ArcGIS Server map service is not cached (I. e. Not "tiled"), then type = "dynamic ".
5. New gadgetsNext, you will add a widget for more features in the browser. Scroll around half of the file until you see a tag. This part is included in the widget in the viewer component tray of the config. xml file. Add the bottom of the following XML Code <Widget label = "traffic camera" <br/> icon = "assets/images/I _camera.png" <br/> Config = "widgets/query/querywidget_louisville_trafficcams.xml" <br/> url = "widgets/query/querywidget.swf"/>