private SpatialElementInfoGroup CreateSpatialElementFromDataRegion() { //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Expected O, but got Unknown //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown if (!m_mapMapper.CanAddSpatialElement) { return(null); } MapSpatialDataRegion mapSpatialDataRegion = (MapSpatialDataRegion)m_mapVectorLayer.MapSpatialData; if (mapSpatialDataRegion == null) { return(null); } object vectorData = mapSpatialDataRegion.Instance.VectorData; if (vectorData == null) { return(null); } ISpatialElement spatialElement = null; if (spatialElement == null) { return(null); } SpatialElementInfo spatialElementInfo = new SpatialElementInfo(); spatialElementInfo.CoreSpatialElement = spatialElement; spatialElementInfo.MapSpatialElement = null; SpatialElementInfoGroup spatialElementInfoGroup = new SpatialElementInfoGroup(); spatialElementInfoGroup.Elements.Add(spatialElementInfo); m_spatialElementsDictionary.Add(new SpatialElementKey(null), spatialElementInfoGroup); OnSpatialElementAdded(spatialElement); m_mapMapper.OnSpatialElementAdded(spatialElementInfo); return(spatialElementInfoGroup); }
protected void OnSpatialElementAdded(SpatialElementInfo spatialElementInfo) { m_vectorLayerMapper.OnSpatialElementAdded(spatialElementInfo.CoreSpatialElement); m_mapMapper.OnSpatialElementAdded(spatialElementInfo); SpatialElementKey spatialElementKey = CreateCoreSpatialElementKey(spatialElementInfo.CoreSpatialElement); if (m_mapVectorLayer.MapDataRegion != null && m_keyTypes == null && spatialElementKey.KeyValues != null) { RegisterKeyTypes(spatialElementKey); } SpatialElementInfoGroup spatialElementInfoGroup; if (!m_spatialElementsDictionary.ContainsKey(spatialElementKey)) { spatialElementInfoGroup = new SpatialElementInfoGroup(); m_spatialElementsDictionary.Add(spatialElementKey, spatialElementInfoGroup); } else { spatialElementInfoGroup = m_spatialElementsDictionary[spatialElementKey]; } spatialElementInfoGroup.Elements.Add(spatialElementInfo); }