ArcGIS viewer for Flex (Getting Started)

Source: Internet
Author: User

 

 

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:

 

  • Web browsers (such as Firefox 4 and IE browser 9 ).
  • On a Web server, the location of ArcGIS's Flex browser will be run on the installed machine (such as IIS or Apache. Ask your system administrator to confirm that your machine runs on a Web server.

    How to start IIS in Windows 7:

    1. Click Start, and then click Control Panel.
    2. On the Control Panel, click programs and then click to enable or disable windows.
    3. In the WINDOWS function s dialog box, Click Internet information service, and then click OK.

     

    For more information, install Vista and IIS 7 on Windows.

  • Optional. Access the ArcGIS Server Standard Edition or advanced edition if you want to add your own web services. Flex browsers generally support more than 9.3 of ArcGIS Server, but some features, such as network editing and time-aware data support, require 10 or more versions of ArcGIS Server.

 

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

 

  1. 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.
  2. Decompress the downloaded package file to create a new folder named flexviewer.
  3. 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 ).

     

    1. Right-click the folder and select permissions.
    2. Go to the Security tab.
    3. 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.

  4. 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"/> 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.