Custom widget of ArcGIS viewer for Flex (Pie Chart of ArcMap design)

Source: Internet
Author: User
Custom widgets can finally implement the first widget. By convention, we use a hello World widget to show how to develop, compile, configure, deploy, and use custom widgets in the flex viewer. The source code of flex viewer already contains a helloworld widget. Let's try it. 1) install flash builder, download the flex viewer source code, and use the latest 2.3; 2) Open flash builder and import the source code of flex viewer 2.3; 3) Place the cursor on the widgets package, right-click, in the displayed menu, select new and click mxml component. 4) in the new mxml component dialog box, enter the package name "widgets. helloworld, enter the widget name "helloworldwidget", select the base class basewidget, and click Finish;
5) at this time, the helloworldwidget has been created. According to the practice advocated by the flex viewer, create an xml configuration file with the same name under the package, that is, "helloworldwidget. XML "; 6) at this time, helloworldwidget will not be compiled because it has not been added to the module list. Open the Properties window of the project, click flex modules, and click Add to add the helloworldwidget to the module list. Click OK and you will find that the helloworldwidget icon is the same as other widgets. (This changes from black to Blue mxml)
7) Start compilation. After compilation, you will find that the helloworldwidget has been compiled into a SWF file under the bin-DEBUG directory;
8) Configure helloworldwidget in config. XML as follows:
<Widgetcontainer>
<Widget label = "helloworld" icon = "assets/images/I _solar.png"
Config = "widgets/helloworld/helloworldwidget. xml"
Url = "widgets/helloworld/helloworldwidget.swf"/>
</Widgetcontainer> 9) Compile and run the command! Hello, flex viewer!
For details, see flexviewer _zyp _.
Ii. design the pie chart Layer

3. Set the "prefecture-level city" layer attribute In ArcMap and select the "symbology" page. Select Show as charts: Pie, add the three fields, and select the color scheme.


4. Set the pie size in the pie chart. Select 2nd variation types, so that the pie size is associated with the sum of the field values. You also need to set the size under the pie to control the pie size.


5. generated after reasonable settings.


6. Of course, you can add basic map elements such as legends under layout.


Custom widget of ArcGIS viewer for Flex (Pie Chart of ArcMap design)

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.