Beispiel #1
0
        private static PolygonTemplate RegisterPriorityPolygonTemplate(
            string ruleName,
            GisColor color,
            MapMakerSettings mapMakerSettings)
        {
            string colorAsString = string.Format(
                CultureInfo.InvariantCulture,
                "{000000:X}",
                color.Rgb);

            List <string> colors = new List <string> ();

            colors.Add(colorAsString);

            PolygonTemplate template = new PolygonTemplate();

            template.Style.SetParameter(
                "rulename",
                ruleName);
            template.Style.SetParameter("colors", colors);
            //template.Style.SetParameter ("typename", typeName);

            template.RegisterType(
                ruleName,
                mapMakerSettings.TypesRegistry,
                true);

            return(template);
        }
Beispiel #2
0
        private void RegisterLandPolygonsTemplate(MapMakerSettings mapMakerSettings)
        {
            GisColor color = Options.LandBackgroundColor;

            landPolygonsTemplate = RegisterPriorityPolygonTemplate(
                RenderingRuleSet.LandPolygonsRuleName,
                color,
                mapMakerSettings);
        }
Beispiel #3
0
        private void RegisterSeaPolygonsTemplate(MapMakerSettings mapMakerSettings)
        {
            GisColor color = Options.SeaColor;

            seaPolygonsTemplate = RegisterPriorityPolygonTemplate(
                RenderingRuleSet.SeaPolygonsRuleName,
                color,
                mapMakerSettings);
        }
        public string SerializeValue(object value)
        {
            GisColor colorValue = (GisColor)value;

            return(ColorTranslator.ToHtml(Color.FromArgb(colorValue.Argb)));
        }