The annotations can be controlled by Flex using the following methods: |
|||||||||
|
|||||||||
|
|||||||||
Using these methods | |||||||||
To use any of the methods above, we first need to create a widget in Flex and assign an id to it. In the following code we create a widget with id '"fw". |
|||||||||
<?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:components="com.fusionwidgets.components.*"> <components:FusionWidgets id="fw" x="10" y="10" FCDataURL="Data.xml" width="400" height="290"/> </s:Application> |
|||||||||
After this we will be adding controls to show or hide the annotations. For this purpose we will be adding two buttons, as in the following code. |
|||||||||
<?xml version="1.0" encoding="utf-8"?> <components:FusionWidgets id="fw" x="10" y="10" FCDataURL="Data.xml" width="400" height="290"/> |
|||||||||
In the above code we call upon the FCShowAnnotation and FCHideAnnotation through the click event of two buttons. These methods are used to show or hide the annotation group with id "GRPRED". |