private MarkerStyle?GetLegendSymbolMarker()
 {
     if (!(m_pointTemplateMapper is SymbolMarkerTemplateMapper))
     {
         return(MarkerStyle.None);
     }
     return(MapMapper.GetMarkerStyle(MapMapper.GetMarkerStyle(((MapMarkerTemplate)GetMapPointTemplate()).MapMarker, hasScope: false)));
 }
        private MarkerStyle?GetLegendSymbolMarker()
        {
            if (!(this.m_pointTemplateMapper is SymbolMarkerTemplateMapper))
            {
                return(MarkerStyle.None);
            }
            MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(((MapMarkerTemplate)this.GetMapPointTemplate()).MapMarker, false);

            return(MapMapper.GetMarkerStyle(markerStyle));
        }
        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);
        }
Beispiel #4
0
        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);
        }