地图显示实例

<?xml version="1.0" encoding="utf-8"?>
<!--
////////////////////////////////////////////////////////////////////////////////
//
//  name:对地图的基本操作 和 一些数据上的展示
//  time:2010.1.3
//  editor:lvh
////////////////////////////////////////////////////////////////////////////////
-->
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%" xmlns:esri="http://www.esri.com/2008/ags" xmlns:tuli="tulie.*"
  creationComplete="canvas1_creationCompleteHandler(event)"  backgroundColor="0x9EBCD8"  xmlns:flexExample="dataManagerModule.flexExample.*"
  xmlns:com="component.*"
  xmlns:local="*" >
 <mx:Script>
  <![CDATA[
   import BroCommon.CustomerEvent;
   import BroCommon.Util;
   import com.esri.ags.Graphic;
   import com.esri.ags.events.QueryEvent;
   import com.esri.ags.events.ZoomEvent;
   import com.esri.ags.geometry.Extent;
   import com.esri.ags.geometry.MapPoint;
   import com.esri.ags.geometry.Polygon;
   import com.esri.ags.symbol.Symbol;
   import com.esri.ags.tasks.FeatureSet;
   import com.esri.ags.tasks.Query;
   import com.esri.ags.tasks.QueryTask;
   import hxq.changP;
   import hxq.songB;
   import component.InfoPopup;
   import mx.collections.ArrayCollection;
   import mx.events.FlexEvent;
   import mx.managers.CursorManager;
   import mx.managers.PopUpManager;
   import mx.rpc.AsyncResponder;
   
   [Embed(source="/images/020.png")]
   private var MouseIcon:Class;
   
   public var peizhiArray:XML;
            
            private var zoomScale:Number = 5000;
            
            //鼠标点过显示信息窗口
   private var graphicClick:Graphic;
            //鼠标移过显示信息窗口
   private var graphic:Graphic;
   //查询函数
   private var qt0:QueryTask;
   
      //查询Tree函数
   private var qt2:QueryTask;
   
   //查询基地函数
   private var qt1:QueryTask;
   
   //查询乡镇点地函数
   private var qt3:QueryTask;
   
   //查询基地点函数
   private var qt4:QueryTask;
   
   //查询基地的基础设施函数
   private var qt5:QueryTask;
   
   //查询场点面的基础设施函数
   private var qt6:QueryTask;
   
   //查询场点面的基础设施函数
   private var qt7:QueryTask;
   
   //查询村点面的基础设施函数
   private var qt8:QueryTask;
   //核心区
   private var qt9:QueryTask
   //点击弹出窗口的类
   private var infoPopup:InfoPopup;
   //点击地图上的点 传递的属性
   private var infoData:Object;
   
   private var infoContainer:Canvas;
   //应用加载后去服务器读取当前用户信息,根据组织机构调用相应的地图服务
   protected function canvas1_creationCompleteHandler(event:FlexEvent):void
   {   
    var peizhiArray:XML = this.parentDocument.OutsideArray
    map.scale = 1200000;
    mapTile.url  ="http://" + peizhiArray.server.@arcgis_host + ":" +peizhiArray.server.@arcgis_port + "/arcgis/rest/services/"+peizhiArray.server.@area_code + "/MapServer";
    mapLayer.url = "http://" + peizhiArray.jidi.@arcgis_host + ":" +peizhiArray.jidi.@arcgis_port + "/arcgis/rest/services/"+peizhiArray.jidi.@area_code + "/MapServer";
       //mapjidi.url ="http://" + peizhiArray.jidi.@arcgis_host + ":" +peizhiArray.jidi.@arcgis_port + "/arcgis/rest/services/"+peizhiArray.jidi.@area_code + "/MapServer";
       
    //进行查询县点 
       qt0 = new QueryTask(mapLayer.url+"/0");
       //县面
       qt2 = new QueryTask(mapLayer.url+"/14");
       //基地面
       qt1 = new QueryTask(mapLayer.url+"/13");
       //乡镇点
       qt3 = new QueryTask(mapLayer.url+"/2");
       //基地点
       qt4 = new QueryTask(mapLayer.url+"/1");
       //村点
       qt8 = new QueryTask(mapLayer.url+"/3");
          //核心区
       qt9 = new QueryTask(mapLayer.url+"/16");
       //基础设施
       qt5 = new QueryTask(mapLayer.url+"/4");
       //基础设施Gai
       qt7 = new QueryTask(mapLayer.url+"/4");
       //乡镇面
       qt6 = new QueryTask(mapLayer.url+"/12");
       qt0.addEventListener(QueryEvent.EXECUTE_COMPLETE, onAreaQueryResult);
       qt3.addEventListener(QueryEvent.EXECUTE_COMPLETE, onXZhenQueryResult);
       qt4.addEventListener(QueryEvent.EXECUTE_COMPLETE, onJDPointResult);
       qt5.addEventListener(QueryEvent.EXECUTE_COMPLETE, onJcssResult);
       qt7.addEventListener(QueryEvent.EXECUTE_COMPLETE, onJcssGResult);
       qt8.addEventListener(QueryEvent.EXECUTE_COMPLETE, onCunGResult);
       qt9.addEventListener(QueryEvent.EXECUTE_COMPLETE, onHxqGResult);
   
   }
   //取得查询方法
   private function getQuery(url:String,code:String):QueryTask{
                    return new QueryTask(url+"/"+code);   
   }
   
   //鼠标滑到以后显示
         private function mouseOverHandler(event:MouseEvent):void
         {    
          
            if(event.target is Graphic){
              graphic = Graphic(event.target);
            }else if(event.target.parent is Graphic){
             graphic = Graphic(event.target.parent);
            }
            else{
             return;
            } 
            
            
            if(graphic.attributes.hasOwnProperty("m")){
                  if(graphic.attributes.ID =="160"){
                      var titleWindow:changP = new changP();  
                    titleWindow.showCloseButton = true;  
                    titleWindow.width = 800;  
                    titleWindow.height = 410;  
      
                    PopUpManager.addPopUp(titleWindow, this, true);  
                    PopUpManager.centerPopUp(titleWindow);  
   
                }else if(graphic.attributes.ID =="100"){
                      var titleWindowA:songB = new songB();  
                    titleWindowA.showCloseButton = true;  
                    titleWindowA.width = 800;  
                    titleWindowA.height = 410;  
      
                    PopUpManager.addPopUp(titleWindowA, this, true);  
                    PopUpManager.centerPopUp(titleWindowA);  
   
                }
            }else{
            if(graphic.attributes.hasOwnProperty("t")){
                  if(graphic.attributes.t == "jidi"){
                    infoData = 
        {
         //point: GeometryUtil.getGravityCenter(Polygon(graphic.geometry)),
         point: map.toMap(new Point(event.stageX, event.stageY)),
         code:graphic.attributes.OBJECTID,
         type:graphic.attributes.t,
         name:graphic.attributes.NAME,
         peizhi:this.parentDocument.OutsideArray
        };
               }else  if(graphic.attributes.t == "xz"){
                          infoData = 
        {
         point: graphic.geometry,
         code:graphic.attributes.OBJECTID,
         type:graphic.attributes.t,
         name:graphic.attributes.NAME,
         infotype:graphic.attributes.Image_type,  
         peizhi:this.parentDocument.OutsideArray
        };
               }else  if(graphic.attributes.t == "area"){
                          infoData = 
        {
         point: graphic.geometry,
         code:graphic.attributes.XZCODE,
         type:graphic.attributes.t,
         name:graphic.attributes.NAME,
         peizhi:this.parentDocument.OutsideArray
        };
               }else  if(graphic.attributes.t == "cun"){
                if(graphic.attributes.ID =="160"){
                     return;
   
                }else if(graphic.attributes.ID =="100"){
                     return;
   
                }else{
                          infoData = 
        {   
         infotype:"cun",
         point: graphic.geometry,
         code:graphic.attributes.ID,
         type:graphic.attributes.t,
         name:graphic.attributes.CUNNAME,
         peizhi:this.parentDocument.OutsideArray
        };
                }
               }else{
                          infoData = 
        {
         point: graphic.geometry,
         code:graphic.attributes.id,
         type:graphic.attributes.t,
         name:graphic.attributes.name,
         peizhi:this.parentDocument.OutsideArray
        };
               }
            
            }
            if(graphic.attributes.hasOwnProperty("TYPE")){
             if(graphic.attributes.TYPE =="SGD" || graphic.attributes.TYPE =="ZXZ"){
              
                     infoData = 
         {
          point: graphic.geometry,
          code:graphic.attributes.SGDBH,
          type:graphic.attributes.TYPE,
                name:graphic.attributes.NAME,
          peizhi:this.parentDocument.OutsideArray
         };
             }if(graphic.attributes.TYPE =="YMJD" ){
              
                     infoData = 
         {
          point: graphic.geometry,
          code:graphic.attributes.ID,
          type:graphic.attributes.TYPE,
                name:graphic.attributes.YMJDname,
          peizhi:this.parentDocument.OutsideArray
         };
             }if(graphic.attributes.TYPE =="HZS" ){
              
                     infoData = 
         {
          point: graphic.geometry,
          code:graphic.attributes.ID,
          type:graphic.attributes.TYPE,
                name:graphic.attributes.YMJDname,
          peizhi:this.parentDocument.OutsideArray
         };
             }else{
                     infoData = 
         {
          point: graphic.geometry,
          code:graphic.attributes.SGDBH,
          type:graphic.attributes.TYPE,
          infotype:graphic.attributes.Image_type,      
                name:graphic.attributes.NAME,
          peizhi:this.parentDocument.OutsideArray
         };
             }
            }
        
           //判断弹出窗口是否为空
          if(infoContainer==null){
           infoContainer = new Canvas();
           infoContainer.percentWidth = 500;
           infoContainer.percentHeight = 400;
           infoContainer.horizontalScrollPolicy = "off";
           infoContainer.verticalScrollPolicy = "off";
           this.addChild(infoContainer);
           infoPopup = new InfoPopup();
           infoPopup.addEventListener("Dclick",function(event:CustomerEvent){
                var obj = event.getObject();
                if(obj!=null){
                 if(obj.type =="jidi"){
                         getJidi(obj.id.toString());
                       }else if(obj.type =="area"){
                           getCity(obj.id.toString());
                       }else if(obj.type=="SGD" || obj.type=="ZXZ"){
                              getSgd(obj.id.toString()); 
                       }
                   }
           })
           infoPopup.map = map;
           infoContainer.addChild(infoPopup);
          }
          infoPopup.currentState="";
          infoPopup.infoData=infoData;
          infoData=null;
                 }
         }
         
         //查找基地图层错误
           private function onFault(info:Object,token:Object=null):void
            {
               Util.debug(info.toString());
            }  
            
            //基地图层查找事件正确响应函数
   private function executeCompleteHandler(result:FeatureSet,token:Object = null):void
            {    
                 var fr:Array =result.features ;
                 if(fr.length>0){
                      var graphic:Graphic = fr[0];
                      graphic.attributes.t="jidi";
                   map.extent = graphic.geometry.extent.expand(1.1); // zoom out a little,以所有查询结果的地理范围进行放大显示
                     
                     
                     //removeDa(10);
                     //getDayLay("0");
                   var params1:Query=new Query();
       params1.geometry = graphic.geometry;
                params1.outFields=['*'];
                params1.returnGeometry = true;
                   qt3.execute(params1);
                 
                qt5.execute(params1);
       var t:Array = new Array();
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymax));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymax));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymin));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
       Polygon(graphic.geometry).addRing(t);
       
       polygonLayer.clear();
       polygonLayer.add(graphic);
        //查找乡镇的点
         
                 }
              }
              
            public function addDayLay(id:String){
               var visibleLayers:ArrayCollection;
                 if(mapLayer is ArcGISDynamicMapServiceLayer)
                  {
                     //获取当前可见图层列表
                     visibleLayers=ArcGISDynamicMapServiceLayer(mapLayer).visibleLayers;
                    //在当前可见图层列表中加入要显示的图层
                     visibleLayers.addItem(id);
                  }
            
            }
            
            public function removeDa(id:int){
                var visibleLayers:ArrayCollection;
                  if(mapLayer is ArcGISDynamicMapServiceLayer)
                  {  
                    //获取当前可见图层列表
                     visibleLayers=ArcGISDynamicMapServiceLayer(mapLayer).visibleLayers;
                      var index:int=visibleLayers.getItemIndex(id);
                   if(id==-1){
                    
                    //在当前可见图层列表中删除显示的图层
                      visibleLayers.removeAll();
                    }else{
                    if(index!=-1){ 
                     visibleLayers.removeItemAt(index);
                    }
                    }
                  }
            }
            //点击收购点查找事件正确响应函数
   private function executeCompleteAHandler(result:FeatureSet,token:Object = null):void
            {    
                 var fr:Array =result.features ;
                 if(fr.length>0){
                      var graphic:Graphic = fr[0];
                      graphic.attributes.t="jidi";
                   map.extent = graphic.geometry.extent.expand(1.1); // zoom out a little,以所有查询结果的地理范围进行放大显示
                   
                    var params1:Query=new Query();
        params1.geometry = graphic.geometry;
                 params1.outFields=['*'];
                 params1.returnGeometry = true;
                 qt3.execute(params1);
                 
                 qt7.execute(params1);
                 qt8.execute(params1);
                 qt9.execute(params1);
       var t:Array = new Array();
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymax));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymax));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymin));
       t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
       Polygon(graphic.geometry).addRing(t);
       
       polygonLayer.clear();
       polygonLayer.add(graphic);
        //查找乡镇的点
         
                 }
              }
            
         //加载县点
         private function getXiandian(){
          //查询参数
    var param:URLVariables = new URLVariables();
    param.xmin = map.extent.xmin;
    param.ymin = map.extent.ymin;
    param.xmax = map.extent.xmax;
    param.ymax = map.extent.ymax;
             //县点
    var qp:Query = new Query();
    qp.geometry = map.extent;
    qp.returnGeometry = true;
    qp.outFields = ["*"];
    qt0.execute(qp);
         
         }
   //基础设施查询结果处理
   private function onTPQueryResult(obj:Object):void{
    for each(var o:Object in obj){
     pointLayer.add(new Graphic(new MapPoint(o.X, o.Y), null, {t:o.T,id:o.ID,name:o.NAME}))
    }
   }
   
     //基地点查询结果处理
   private function onJDPointResult(event:QueryEvent):void{
    for each(var g:Graphic in event.featureSet.features){
     g.attributes.t = "jidi"
     pointLayer.add(g);
    }
   }
   //查找JCSS的查询结果处理
   private function onJcssResult(event:QueryEvent):void{
        for each(var g:Graphic in event.featureSet.features){
     if(g.attributes.TYPE =="SGD" || g.attributes.TYPE =="ZXZ"){
            //g.attributes.Image_type="jcss"
            pointLayer.add(g);
        }
    }
   }
   
      //查找JCSSG的查询结果处理
   private function onJcssGResult(event:QueryEvent):void{
        for each(var g:Graphic in event.featureSet.features){
        if(g.attributes.TYPE =="SGD" || g.attributes.TYPE =="ZXZ"){
            // g.attributes.Image_type="jcss"
                //pointLayer.add(g);
        }else if(g.attributes.TYPE =="YMJD"){
          g.attributes.Image_type="jcss"
           pointLayer.add(g);
        }else if(g.attributes.TYPE=="HZS"){
          g.attributes.Image_type="jcss"
                 pointLayer.add(g);
        }
    }
   }
   
    //查找村的查询结果处理
   private function onCunGResult(event:QueryEvent):void{
        for each(var g:Graphic in event.featureSet.features){
         if(g.attributes.ID!="160" && g.attributes.ID!="100"){
             g.attributes.t="cun"
                pointLayer.add(g);
         }
    }
   }
   
      //查找核心区的查询结果处理
   private function onHxqGResult(event:QueryEvent):void{
        for each(var g:Graphic in event.featureSet.features){
         if(g.attributes.ID=="160" || g.attributes.ID=="100"){
             g.attributes.m="hxq"
                pointLayer.add(g);
         }
    }
   }
   
      //行政区划点查询结果处理
   private function onAreaQueryResult(event:QueryEvent):void{
    for each(var g:Graphic in event.featureSet.features){
     g.attributes.t = "area"
     pointLayer.add(g);
    }
   }
   
   //乡镇点查询处理
   private function onXZhenQueryResult(event:QueryEvent):void{
    for each(var g:Graphic in event.featureSet.features){
     g.attributes.t = "xz"
     g.attributes.Image_type="xzd"
     pointLayer.add(g);
    }
   }
         //Graphics样式
   private function symbolFunc(g:Graphic):Symbol{
    //基础设施
    if(g.attributes.t == "TP_STATION"){
     return TP_STATION;
    }else if(g.attributes.t == "jidi"){
        return areaSymbol1;
    }else if(g.attributes.t=="TP_WATER_PROJECT"){
    return TP_WATER_PROJECT;
    }
    else if(g.attributes.t=="TP_TRACTOR_ROAD"){
    return TP_TRACTOR_ROAD;
    }
    else if(g.attributes.t=="TP_DRY_HOUSE"){
    return TP_DRY_HOUSE;
    }
    else if(g.attributes.t=="TP_ROAST_HOUSE"){
    return TP_ROAST_HOUSE;
    }
    else if(g.attributes.t=="TP_GROW_POINT"){
    return TP_GROW_POINT;
    }
    else if(g.attributes.t=="TP_LEAF_FIELD"){
    return TP_LEAF_FIELD;
    }else if(g.attributes.t=="xz"){
    return areaSymbol1;
    }else if(g.attributes.hasOwnProperty("m")){
     return areaSymbol1;
    }
    //行政区划
    else{
     
     return areaSymbol1;
    }
   }
   //点击树的方法
     public function map_zoomEndHandler(event:ZoomEvent):void
   {  
      if(flexGJ.tree.selectedItem!=null){
     var Tree_directoryID:String=flexGJ.tree.selectedItem.Directory_ID;
      if(Tree_directoryID!=null){ 
        if(Tree_directoryID == "002"){
            map_fullextend();
        }else if(Tree_directoryID =="350784"){
            getCity(Tree_directoryID);
        }else if(Tree_directoryID.length == 1){
         getJidi(Tree_directoryID);
        }
       }
       if(flexGJ.tree.selectedItem.Directory_TYPE!=null){
           if(flexGJ.tree.selectedItem.Directory_TYPE =="sgd"){
               getSgd(Tree_directoryID);
           }else if(flexGJ.tree.selectedItem.Directory_TYPE =="hxqcp"){
               getSgd(Tree_directoryID);
                  var titleWindow:changP = new changP();  
                    titleWindow.showCloseButton = true;  
                    titleWindow.width = 800;  
                    titleWindow.height = 410;  
      
                    PopUpManager.addPopUp(titleWindow, this, true);  
                    PopUpManager.centerPopUp(titleWindow);  
           }else if(flexGJ.tree.selectedItem.Directory_TYPE =="hxqsb"){
                getSgd(Tree_directoryID);
                  var titleWindowA:songB = new songB();  
                    titleWindowA.showCloseButton = true;  
                    titleWindowA.width = 800;  
                    titleWindowA.height = 410;  
      
                    PopUpManager.addPopUp(titleWindowA, this, true);  
                    PopUpManager.centerPopUp(titleWindowA); 
           }
        
       }
      }
       }
      //点击县级市的响应结果
      private function getCity(id:String){
       if(id =="350784"){
         mapLayer.visibleLayers =new ArrayCollection([13,1,2,17])
        pointLayer.clear();
        map.scrollWheelZoomEnabled =false;
        //查找市的面
           var params:Query=new Query();
     params.where = "CNTY_CODE ='"+id+"'";
             params.outFields=['*'];
              params.returnGeometry = true;
        qt2.execute(params,new AsyncResponder(treeClickQuery,onFault));
       }else{
       return;
       }
      }
      //点击收购点的响应结果
      private function getSgd(id:String){
       mapLayer.visibleLayers =new ArrayCollection([4,2,3,0,16,5,6,8,9,12,17])
         //查找场点的面
             pointLayer.clear();
             map.scrollWheelZoomEnabled =true;
           var params:Query=new Query();
     params.where = "SGZCODE='"+id+"'";
             params.outFields=['*'];
              params.returnGeometry = true;
        qt6.execute(params,new AsyncResponder(executeCompleteAHandler,onFault));
      }
      
      public function getJidi(id:String){
         mapLayer.visibleLayers =new ArrayCollection([12,2,17,18])
         pointLayer.clear();
         map.scrollWheelZoomEnabled =true;
         //查找基地的图层
          var params:Query=new Query();
            params.outFields=['*'];
            params.where = "CNTY_CODE='"+id+"'";
             params.returnGeometry = true;
       qt1.execute(params,new AsyncResponder(executeCompleteHandler,onFault));
       
      }
      
 
           //基地图层查找事件正确响应函数
   private function treeClickQuery(result:FeatureSet,token:Object = null):void
            {   
                var fr:Array =result.features;
                if(fr.length>0){
                  var graphic:Graphic = fr[0];
                  var unionedExtent:Extent = fr[0].geometry.extent;
                  for(var i:int=1; i<fr.length; i++){
                 unionedExtent = unionedExtent.union(fr[i].geometry.extent);
                 Polygon(graphic.geometry).addRing(Polygon(fr[i].geometry).rings[0]);
                  }
                 
                  map.extent = unionedExtent.expand(1.1);
                 
              //查找基地的点
        var paramsG:Query=new Query();
     paramsG.geometry = graphic.geometry;
             paramsG.outFields=['*'];
              paramsG.returnGeometry = true;
              qt4.execute(paramsG);
              qt3.execute(paramsG);
                  //var graphic:Graphic = fr[0];
                  //map.extent = graphic.geometry.extent.expand(1.1); // zoom out a little,以所有查询结果的地理范围进行放大显示
      var t:Array = new Array();
      t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
      t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymax));
      t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymax));
      t.push(new MapPoint(mapLayer.fullExtent.extent.xmax, mapLayer.fullExtent.extent.ymin));
      t.push(new MapPoint(mapLayer.fullExtent.extent.xmin, mapLayer.fullExtent.extent.ymin));
      Polygon(graphic.geometry).addRing(t);
      
      polygonLayer.clear();
      polygonLayer.add(graphic);
    }
    else{
     polygonLayer.clear();
    }
              }
      
       //全图
             private function map_fullextend():void{
               mapLayer.visibleLayers =new ArrayCollection([0,14])
               if(!map.visible)map.visible=true;
               pointLayer.clear();
     polygonLayer.clear();
     map.scrollWheelZoomEnabled =false;
     map.extent = mapLayer.fullExtent;
     getXiandian();
    }

   protected function flexGJ_checkBoxChangedEventHandler(event:Event):void
   {
    //Util.debug(flexGJ.tp_leaf_field.selected)
   }

  ]]>
 </mx:Script>

     <!--设置点样式 -->
     <esri:SimpleMarkerSymbol id="areaSymbol1" size="20" alpha="0.0" color="0xFF0000"/>
     <esri:SimpleFillSymbol id="sfsFind" alpha="0.0"/>
     <esri:PictureMarkerSymbol id="TP_STATION"       source="@Embed('images/tp_stationG.gif')" />
     <esri:PictureMarkerSymbol id="TP_WATER_PROJECT" source="@Embed('images/TP_WATER_PROJECTG.gif')"/>
     <esri:PictureMarkerSymbol id="TP_TRACTOR_ROAD"  source="@Embed('images/TP_TRACTOR_ROADG.gif')" />
     <esri:PictureMarkerSymbol id="TP_DRY_HOUSE"     source="@Embed('images/TP_DRY_HOUSE.gif')"/>
     <esri:PictureMarkerSymbol id="TP_ROAST_HOUSE"   source="@Embed('images/TP_ROAST_HOUSEG.gif')"/>
     <esri:PictureMarkerSymbol id="TP_GROW_POINT"    source="@Embed('images/TP_GROW_POINTG.gif')"/>
     <esri:PictureMarkerSymbol id="TP_LEAF_FIELD"    source="@Embed('images/TP_LEAF_FIELDG.gif')"/> 
     
     <esri:SimpleLineSymbol id="lineSymbol" color="0x0000FF" width="5"/>
     <esri:SimpleFillSymbol id="polygonSymbol" color="#EAEAEA" alpha="1"/>
     
  <esri:Map id="map" left="0" top="0" right="0" bottom="0" doubleClickZoomEnabled="false" visible="false" scaleBarVisible="false" zoomSliderVisible="false" scrollWheelZoomEnabled ="true"
   navigationStyleName="navigationStyle" logoVisible="false"  backgroundColor="#EAEAEA">
      <esri:ArcGISTiledMapServiceLayer id="mapTile" visible="true"  />
     <esri:ArcGISDynamicMapServiceLayer id="mapLayer" alpha="0.7"  visible="true"   load="map_fullextend()" imageFormat="png24" />
   <esri:GraphicsLayer id="graphicsLayer" symbolFunction="symbolFunc"  
        mouseOver="CursorManager.setCursor(MouseIcon)"
        mouseOut="CursorManager.removeAllCursors()"/>
   <esri:GraphicsLayer id="pointLayer" symbolFunction="symbolFunc" mouseOver="CursorManager.setCursor(MouseIcon)" click="mouseOverHandler(event)" 
        mouseOut="CursorManager.removeAllCursors()"/>
   <esri:GraphicsLayer id="polygonLayer" symbol="{polygonSymbol}"/>
  </esri:Map>
   <mx:VBox id="toc" moveEffect="{moveEffect}" width="100%" height="100%" horizontalAlign="right" showEffect="{showTOC}" hideEffect="{hideTOC}" right="40" scroll="false">
  <flexExample:MenuToolNp id="flexGJ" checkBoxChangedEvent="flexGJ_checkBoxChangedEventHandler(event)" TreeClickEvent="map_zoomEndHandler(null)"/>
   </mx:VBox>
     <tuli:nanpTuli bottom="10" left="10"  />
     <mx:Move id="moveEffect" target="{toc}"/>
     <mx:WipeLeft id="showTOC" target="{toc}"/>
  <mx:WipeRight id="hideTOC" target="{toc}"/>

</mx:Canvas>


转载:http://1984yifeng.blog.163.com/blog/static/4728439120103232574073/






【SCI一区复现】基于配电网韧性提升的应急移动电源预配置和动态调度(下)—MPS动态调度(Matlab代码实现)内容概要:本文档围绕“基于配电网韧性提升的应急移动电源预配置和动态调度”主题,重点介绍MPS(Mobile Power Sources)动态调度的Matlab代码实现,是SCI一区论文复现的技术资料。内容涵盖在灾害或故障等极端场景下,如何通过优化算法对应急移动电源进行科学调度,以提升配电网在突发事件中的恢复能力与供电可靠性。文档强调采用先进的智能优化算法进行建模求解,并结合IEEE标准测试系统(如IEEE33节点)进行仿真验证,具有较强的学术前沿性和工程应用价值。; 适合人群:具备电力系统基础知识和Matlab编程能力,从事电力系统优化、配电网韧性、应急电源调度等相关领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①用于复现高水平期刊(SCI一区、IEEE顶刊)中关于配电网韧性与移动电源调度的研究成果;②支撑科研项目中的模型构建与算法开发,提升配电网在故障后的快速恢复能力;③为电力系统应急调度策略提供仿真工具与技术参考。; 阅读建议:建议结合前篇“MPS预配置”内容系统学习,重点关注动态调度模型的数学建模、目标函数设计与Matlab代码实现细节,建议配合YALMIP等优化工具包进行仿真实验,并参考文中提供的网盘资源获取完整代码与数据。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值