protected override void RenderSpatialElement(SpatialElementInfo spatialElementInfo, bool hasScope) { InitializeSpatialElement(spatialElementInfo.CoreSpatialElement); if (hasScope) { RenderLineRuleFields((Path)spatialElementInfo.CoreSpatialElement); } RenderLineTemplate((MapLine)spatialElementInfo.MapSpatialElement, (Path)spatialElementInfo.CoreSpatialElement, hasScope); }
protected override void RenderSpatialElement(SpatialElementInfo spatialElementInfo, bool hasScope) { InitializeSpatialElement(spatialElementInfo.CoreSpatialElement); if (hasScope) { RenderPolygonRulesField((Shape)spatialElementInfo.CoreSpatialElement); } RenderPolygonTemplate((MapPolygon)spatialElementInfo.MapSpatialElement, (Shape)spatialElementInfo.CoreSpatialElement, hasScope); RenderPolygonCenterPoint(spatialElementInfo, hasScope); }
private void RenderPolygonCenterPoint(SpatialElementInfo spatialElementInfo, bool hasScope) { if (HasCenterPointRule() || HasCenterPointTemplate((MapPolygon)spatialElementInfo.MapSpatialElement, MapPolygonLayer.MapCenterPointTemplate, hasScope)) { Symbol symbol = (Symbol)GetSymbolManager().CreateSpatialElement(); symbol.Layer = spatialElementInfo.CoreSpatialElement.Layer; symbol.Category = spatialElementInfo.CoreSpatialElement.Category; symbol.ParentShape = spatialElementInfo.CoreSpatialElement.Name; CopyFieldsToPoint((Shape)spatialElementInfo.CoreSpatialElement, symbol); GetSymbolManager().AddSpatialElement(symbol); RenderPoint(spatialElementInfo.MapSpatialElement, symbol, hasScope); } }
private void CoreMap_ElementAdded(object sender, ElementEventArgs e) { if (!(e.MapElement is ISpatialElement)) { return; } if (!m_shapefileMatchingLayer) { if (!m_vectorLayerMapper.IsValidSpatialElement((ISpatialElement)e.MapElement)) { throw new RenderingObjectModelException(RPRes.rsMapShapefileTypeMismatch(RPRes.rsObjectTypeMap, m_mapVectorLayer.MapDef.Name, m_mapVectorLayer.Name, m_shapefile.Instance.Source)); } m_shapefileMatchingLayer = true; } SpatialElementInfo spatialElementInfo = new SpatialElementInfo(); spatialElementInfo.CoreSpatialElement = (ISpatialElement)e.MapElement; OnSpatialElementAdded(spatialElementInfo); }
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); }
protected abstract void RenderSpatialElement(SpatialElementInfo spatialElementInfo, bool hasScope);
protected override void RenderSpatialElement(SpatialElementInfo spatialElementInfo, bool hasScope) { InitializeSpatialElement(spatialElementInfo.CoreSpatialElement); RenderPoint((MapPoint)spatialElementInfo.MapSpatialElement, (Symbol)spatialElementInfo.CoreSpatialElement, hasScope); }