<?xml version="1.0" encoding="utf-8"?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Display footer on maps // //////////////////////////////////////////////////////////////////////////////// --> <BaseWidget xmlns ="com.esri.solutions.flexviewer.*" xmlns:mx ="http://www.adobe.com/2006/mxml" x ="600" y ="220" widgetConfigLoaded ="init()"> <mx:Script> <![CDATA[ import com.esri.ags.events.ExtentEvent; import mx.controls.Alert; import com.esri.ags.Map; private function init():void { map.addEventListener(ExtentEvent.EXTENT_CHANGE, repositionInfo); txtVersion.text = "footer text"; } private function repositionInfo(event:Event):void { txtVersion.text = "footer text"; } ]]> </mx:Script> <mx:Label id="txtVersion" alpha="1" /> </BaseWidget>
<?xml version="1.0" encoding="utf-8"?> <!-- //////////////////////////////////////////////////////////////////////////////// // // Display footer on maps // //////////////////////////////////////////////////////////////////////////////// --> <BaseWidget xmlns ="com.esri.solutions.flexviewer.*" xmlns:mx ="http://www.adobe.com/2006/mxml" x ="600" y ="220" widgetConfigLoaded ="init()" > <mx:Script> <![CDATA[ import mx.messaging.channels.StreamingAMFChannel; import com.esri.ags.events.ExtentEvent; import mx.controls.Alert; import com.esri.ags.Map; import mx.controls.Alert; private function init():void { const color:String = "0x000000"; txtVersion.setStyle("color", toNumber(color.length ? color : "0x000000")); const fontFamily:String = "Verdana"; txtVersion.setStyle("fontFamily", fontFamily.length ? fontFamily : "Verdana"); const fontSize:String = configXML.label.@fontsize; txtVersion.setStyle("fontSize", parseInt(fontSize.length ? fontSize : "9")); const fontWeight:String = configXML.label.@fontweight; txtVersion.setStyle("fontWeight", fontWeight.length ? fontWeight : "bold"); txtVersion.text = "Footer Text"; } private function toNumber(value:String):int { if (value.substr(0, 2) == "0x") { return parseInt(value, 16); } return parseInt(value, 10); } ]]> </mx:Script> <mx:Label id="txtVersion" alpha="1" text="Footer Text" enabled="true"/> </BaseWidget>
Daniel, If you are wanting to add some static text to the bottom of the map then just add a mx label to the index.mxml.
Daniel, For that just set the bottom and right attributes to 0 or 5.
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.