private function hideESRILogo(map:Map) : void { for(var i:int=0; i<map.staticLayer.numChildren; i++){ if (map.staticLayer.getChildAt(i) is Image) { (map.staticLayer.getChildAt(i) as Image).visible = false; return; } } }
hideESRILogo(map);
Starting with Flex API 2.0, you can just set map.logoVisible to false to turn it off. The check for which layers are loaded has been removed.
Justin, Sure this is what works in the Flexviewer 2.0.Add this to the MapManager.mxmlprivate function hideESRILogo(map:Map) : void { for(var i:int=0; i<map.staticLayer.numChildren; i++){ if (map.staticLayer.getChildAt(i) is Image) { (map.staticLayer.getChildAt(i) as Image).visible = false; return; } } }and then find the mapLoadComplete function and add thishideESRILogo(map);
Dasa,Where do you set map.logoVisible to false? Is it in the mapLoadComplete function that Robert referred to?Thanks for both of your help.UPDATE: I'm brand new to ActionScript as well, so syntax would help. I've tried map.logoVisible(false) and map.LogoVisible("false"), but it doesn't like either...
protected override function partAdded(partName:String, instance:Object):void { super.partAdded(partName, instance); if (instance == map) { map.zoomSliderVisible = false; map.addEventListener(MapEvent.LOAD, mapLoadComplete); map.logoVisible = false; } }
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.