Ejemplo n.º 1
0
        private void AddFieldDefinitions()
        {
            MapFieldDefinitionCollection mapFieldDefinitions = m_mapVectorLayer.MapFieldDefinitions;

            if (mapFieldDefinitions == null)
            {
                return;
            }
            foreach (MapFieldDefinition item in mapFieldDefinitions)
            {
                m_spatialElementManager.AddFieldDefinition(GetUniqueFieldName(item.Name), GetFieldType(item.DataType));
            }
        }
Ejemplo n.º 2
0
        private void ProcessNonSpatialFields(MapSpatialElement embeddedElement, ISpatialElement spatialElement)
        {
            MapFieldCollection mapFields = embeddedElement.MapFields;

            if (mapFields == null)
            {
                return;
            }
            MapFieldDefinitionCollection mapFieldDefinitions = m_mapVectorLayer.MapFieldDefinitions;

            if (mapFieldDefinitions == null)
            {
                return;
            }
            foreach (MapField item in mapFields)
            {
                MapFieldDefinition fieldDefinition = mapFieldDefinitions.GetFieldDefinition(item.Name);
                if (fieldDefinition == null)
                {
                    throw new RenderingObjectModelException(RPRes.rsMapInvalidFieldName(RPRes.rsObjectTypeMap, m_mapVectorLayer.MapDef.Name, m_mapVectorLayer.Name, item.Name));
                }
                m_spatialElementManager.AddFieldValue(spatialElement, GetUniqueFieldName(item.Name), GetFieldValue(item.Value, fieldDefinition.DataType));
            }
        }