private void RenderMarker(PredefinedSymbol customSymbol, MapMarker mapMarker) { MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(mapMarker, hasScope: true); if (markerStyle != MapMarkerStyle.Image) { customSymbol.MarkerStyle = MapMapper.GetMarkerStyle(markerStyle); return; } MapMarkerImage mapMarkerImage = mapMarker.MapMarkerImage; if (mapMarkerImage == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, m_mapRule.MapDef.Name, m_mapVectorLayer.Name, "MapMarkerImage")); } customSymbol.Image = m_mapMapper.AddImage(mapMarkerImage); customSymbol.ImageResizeMode = m_mapMapper.GetImageResizeMode(mapMarkerImage); customSymbol.ImageTransColor = m_mapMapper.GetImageTransColor(mapMarkerImage); }
protected override void RenderPointTemplate(MapPointTemplate mapPointTemplate, Symbol coreSymbol, bool customTemplate, bool ignoreBackgoundColor, bool ignoreSize, bool ignoreMarker, bool hasScope) { base.RenderPointTemplate(mapPointTemplate, coreSymbol, customTemplate, ignoreBackgoundColor, ignoreSize, ignoreMarker, hasScope); if (ignoreMarker) { return; } MapMarker mapMarker = ((MapMarkerTemplate)mapPointTemplate).MapMarker; MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(mapMarker, hasScope); if (markerStyle != MapMarkerStyle.Image) { coreSymbol.MarkerStyle = MapMapper.GetMarkerStyle(markerStyle); return; } MapMarkerImage mapMarkerImage = mapMarker.MapMarkerImage; if (mapMarkerImage == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, m_mapVectorLayer.MapDef.Name, m_mapVectorLayer.Name, "MapMarkerImage")); } string image; if (CanShareMarkerImage(mapMarkerImage, customTemplate)) { if (sharedImageName == null) { sharedImageName = m_mapMapper.AddImage(mapMarkerImage); } image = sharedImageName; } else { image = m_mapMapper.AddImage(mapMarkerImage); } coreSymbol.Image = image; coreSymbol.ImageResizeMode = m_mapMapper.GetImageResizeMode(mapMarkerImage); coreSymbol.ImageTransColor = m_mapMapper.GetImageTransColor(mapMarkerImage); }
protected int GetBucketCount() { if (!this.IsRuleFieldDefined) { return(this.m_coreSpatialElementManager.GetSpatialElementCount()); } MapRuleDistributionType distributionType = this.GetDistributionType(); ReportIntProperty bucketCount = this.m_mapRule.BucketCount; int num = RuleMapper.m_defaultBucketCount; if (bucketCount != null) { num = (bucketCount.IsExpression ? this.m_mapRule.Instance.BucketCount : bucketCount.Value); } if (!this.IsRuleFieldScalar) { return(this.m_coreSpatialElementManager.GetDistinctValuesCount(this.m_coreRule.Field)); } switch (distributionType) { case MapRuleDistributionType.Optimal: case MapRuleDistributionType.EqualDistribution: return(Math.Min(num, this.m_coreSpatialElementManager.GetDistinctValuesCount(this.m_coreRule.Field))); case MapRuleDistributionType.Custom: { MapBucketCollection mapBuckets = this.m_mapRule.MapBuckets; if (mapBuckets == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, this.m_mapRule.MapDef.Name, this.m_mapVectorLayer.Name, "MapBuckets")); } return(mapBuckets.Count); } default: return(num); } }