slid 값을 지정한 도면층에 보이기

4429 단어 id
// slid 

            private function initOpLayers():void

            {

                if (configXML.hasOwnProperty("visiblelsids"))

                {

                    for each(var lyro:Object in configData.opLayers)

                    {

                        map.getLayer(lyro.lyrid).visible=false;

                    }

                    var visiblelsids:XMLList = configXML.visiblelsids.visiblelsid;

                    for each(var visiblelsid:XML in visiblelsids)

                    {

                        if(this.configData.services.lyrservices.hasOwnProperty(visiblelsid.@id))

                        {

                            var lyrO:Object=this.configData.services.lyrservices[visiblelsid.@id];

                            var temlayer:Layer=map.getLayer(lyrO.lyrid);

                            if(temlayer is TiledMapServiceLayer)

                            {

                                temlayer.visible=true;

                            }

                            else if(temlayer is ArcGISDynamicMapServiceLayer)

                            {

                                temlayer.visible=true;                                        

                            }

                        }

                        

                    }

                }

            }

URL을 통해 맵의 도면층을 볼 수 있습니다
GisUtil.getInstance().showLayerByUrl(map,this.serviceurl);

 
protected function bordercontainer1_clickHandler(event:MouseEvent):void

            {

                var lyrO:Object=data.configData.services.lyrservices[data.lsid];            

                for each(var lyro:Object in (data.configData as ConfigData).basemaps)

                {

                    if(lyro.lyrid==lyrO.lyrid)

                    {

                        data.map.getLayer(lyro.lyrid).visible=true;

                    }

                    else

                    {

                        data.map.getLayer(lyro.lyrid).visible=false;

                    }

                    

                }

            }

좋은 웹페이지 즐겨찾기