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