Custom widget of arcgis viewer for flex (pie Chart of arcmap design) and arcgiswidget

Source: Internet
Author: User

Custom widget of arcgis viewer for flex (pie Chart of arcmap design) and arcgiswidget
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.



ArcGIS Viewer for Flex cracked version with installation instructions

ArcGIS Viewer for Flex is free of charge.

After installing ArcGIS Viewer for Flex, I opened it and said that I cannot create flexviewers to C: \ inetpub \ wwwroot.

Set related permissions on my website, or share the generated Viewer website project folder on the WEB and publish the website.

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.