コード例 #1
0
        private List <ISpatialElement> GetElementViewSpatialElements(MapElementView mapView)
        {
            MapBindingFieldPairCollection mapBindingFieldPairs = mapView.MapBindingFieldPairs;

            if (mapBindingFieldPairs == null)
            {
                return(null);
            }
            SpatialElementKey      obj  = VectorLayerMapper.CreateDataRegionSpatialElementKey(mapBindingFieldPairs);
            List <ISpatialElement> list = null;

            foreach (KeyValuePair <SpatialElementKey, SpatialElementInfoGroup> item in this.m_spatialElementsDictionary)
            {
                foreach (SpatialElementInfo element in item.Value.Elements)
                {
                    if (SpatialDataMapper.CreateCoreSpatialElementKey(element.CoreSpatialElement, mapView.MapBindingFieldPairs, this.m_mapVectorLayer.MapDef.Name, this.m_mapVectorLayer.Name).Equals(obj))
                    {
                        if (list == null)
                        {
                            list = new List <ISpatialElement>();
                        }
                        list.Add(element.CoreSpatialElement);
                    }
                }
            }
            return(list);
        }
コード例 #2
0
        private string GetElementViewLayerName(MapElementView mapView)
        {
            ReportStringProperty layerName = mapView.LayerName;

            if (!layerName.IsExpression)
            {
                return(layerName.Value);
            }
            return(mapView.Instance.LayerName);
        }
コード例 #3
0
 private void AddSpatialElementToView(MapElementView mapView)
 {
     if (!(this.GetElementViewLayerName(mapView) != this.m_mapVectorLayer.Name))
     {
         List <ISpatialElement> elementViewSpatialElements = this.GetElementViewSpatialElements(mapView);
         if (elementViewSpatialElements != null)
         {
             foreach (ISpatialElement item in elementViewSpatialElements)
             {
                 this.m_mapMapper.AddSpatialElementToView(item);
             }
         }
         else
         {
             foreach (KeyValuePair <SpatialElementKey, SpatialElementInfoGroup> item2 in this.m_spatialElementsDictionary)
             {
                 this.AddSpatialElementGroupToView(item2.Value);
             }
         }
     }
 }
コード例 #4
0
 public MapElementViewInstance(MapElementView defObject)
     : base(defObject)
 {
     this.m_defObject = defObject;
 }