Implement Dynamic plotting (1.0 alpha) based on ArcGIS Flex API)

Source: Internet
Author: User

As a form of data presentation, plotting is required in multiple industries. The plotting API is implemented based on ArcGIS Flex API (3.6). The current version is 1.0 alpha and supports several commonly used painting symbols, including:

Arc, curve, circle, elliptical, bow, slice, closed curve, ground, straight arrow, straight arrow, direction of attack, direction of attack (tail), force click, team battle, team battle (tail)

Currently, only plotting is supported, and the interface design is simple, just a few lines of code, as shown below:

Import com. esri. ags. symbols. simpleFillSymbol; import com. esri. ags. symbols. simpleLineSymbol; import gispace. plot. fillPlot; import gispace. plot. linePlot; import gispace. plot. plotTypes; import gispace. plot. events. plotDrawEvent; import gispace. plot. tools. plotDrawTool; private var plotDrawTool: PlotDrawTool; private var lineSymbol: SimpleLineSymbol = new SimpleLineSymbol ("solid", 0x0000ff, 1, 2); private var outline: simpleLineSymbol = new SimpleLineSymbol ("solid", 0xff0000, 1, 1); private var fillSymbol: SimpleFillSymbol = new SimpleFillSymbol ("solid", 0x00ff00, 0.5, outline ); private function init (): void {// instantiate this. plotDrawTool = new PlotDrawTool (map); // listens to the DRAW_END event and obtains plotthis after drawing. plotDrawTool. addEventListener (PlotDrawEvent. DRAW_END, drawEndHandler);} private function drawEndHandler (event: PlotDrawEvent): void {// set the rendering symbol if (event. plotGraphic. geometry is FillPlot) event. plotGraphic. symbol = fillSymbol; else if (event. plotGraphic. geometry is LinePlot) event. plotGraphic. symbol = lineSymbol; this. graphicsLayer. add (event. plotGraphic );}

Demo:

:


Functions provided by the next version:

1) editing of the painting symbol;

2) more types of painting symbols, including commonly used points, lines, and surfaces.

You are welcome to use and provide feedback. This API will be continuously updated.

Contact: QQ: 21587252 email: gispace@yeah.net


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.