<?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:esri="http://www.esri.com/2008/ags"> <fx:Script> <![CDATA[ private function visibleCheckBox_clickHandler(event:MouseEvent):void { if (visibleCheckBox.selected) { fadeInEffect.end(); fadeInEffect.play(); } else { fadeOutEffect.end(); fadeOutEffect.play(); } } ]]> </fx:Script> <fx:Declarations> <s:Fade id="fadeInEffect" alphaFrom="0" alphaTo="1" effectEnd="imageLayer.visible = true" target="{imageLayer}"/> <s:Fade id="fadeOutEffect" alphaFrom="1" alphaTo="0" effectEnd="imageLayer.visible = false" target="{imageLayer}"/> </fx:Declarations> <s:controlBarContent> <s:CheckBox id="visibleCheckBox" click="visibleCheckBox_clickHandler(event)" label="Image layer visibility" selected="{imageLayer.visible}"/> </s:controlBarContent> <esri:Map> <esri:extent> <esri:Extent xmin="-13486000" ymin="5713000" xmax="-13200000" ymax="5823000"> <esri:SpatialReference wkid="102100"/> </esri:Extent> </esri:extent> <esri:ArcGISTiledMapServiceLayer url="http://server.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/> <esri:ArcGISImageServiceLayer id="imageLayer" noData="0" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer"/> </esri:Map> </s:Application>
Where you want that effect, Can you please provide further detail or snapshot of what you want to achieve.
Is it possible to implement the gradient effect when turn on/off a layer by using ArcGIS API for flex? Thanks!
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.