gisdream
  在使用flex开发arcgisserver的过程中,地图上会被默认的加上一个esri自己logo。一般情况下,比如用的是自己的服务,直接在地图属性中加上logovisible=“false”就可以隐藏logo了。但是如果使用的是在线的地图服务,或者非服务模式的地图,则没有效果。于是采取了两种方法来处理。第一个是强制去掉,第二个是用自己的logo遮住ESRI的logo,偷天换日。
第一种方法:
private function init():void//init是默认加载完毕后执行的函数
{
        reallyHideESRILogo(myMap);
}

import mx.core.UIComponent;
import mx.controls.Image;

private function reallyHideESRILogo(map : Map) : void {
    for(var i : int = 0 ; i < map.numChildren ; i++){
    var component : UIComponent = map.getChildAt(i) as UIComponent;
    if(component.className == "StaticLayer"){
        for(var j : int = 0 ; j < component.numChildren ; j++){
            var stComponent : UIComponent = component.getChildAt(j) as UIComponent;
            if(stComponent.className == "Image"){
                var img:Image = stComponent as Image;
                if (img.source.toString().indexOf("logo") > 0){
                    stComponent.visible = false;
                    return;
                }
            }
        }
     }
  }
}

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-24
  • 2022-12-23
  • 2021-12-25
猜你喜欢
  • 2021-12-13
  • 2022-12-23
  • 2021-11-11
  • 2022-12-23
  • 2021-09-20
  • 2022-12-23
  • 2021-07-22
相关资源
相似解决方案