private static List <CustomSymbolizer> GetBasicLineSymbols()
        {
            List <CustomSymbolizer> lst = new List <CustomSymbolizer>();

            LineSymbolizer       sym1  = new LineSymbolizer();
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer
            {
                Symbolizer = sym1,
                UniqueName = "line_0001",
                Category   = "default"
            };

            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();

            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);

            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);

            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer
            {
                Symbolizer = sym2,
                UniqueName = "line_0002",
                Category   = "default"
            };

            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();

            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown)
            {
                DashStyle = DashStyle.Dash
            };

            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer
            {
                Symbolizer = sym3,
                UniqueName = "line_0003",
                Category   = "travel",
                Name       = "path"
            };

            lst.Add(cust3);
            return(lst);
        }
        private static List <CustomSymbolizer> getBasicLineSymbols()
        {
            List <CustomSymbolizer> lst = new List <CustomSymbolizer>();

            LineSymbolizer       sym1  = new LineSymbolizer();
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();

            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Category   = "default";
            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();

            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);

            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);

            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();

            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Category   = "default";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();

            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);

            stroke3.DashStyle = DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();

            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category   = "travel";
            cust3.Name       = "path";
            lst.Add(cust3);
            return(lst);
        }
示例#3
0
        private static List <CustomLineSymbolizer> GetLineSymbols()
        {
            List <CustomLineSymbolizer> lst = new List <CustomLineSymbolizer>();

            LineSymbolizer sym1 = new LineSymbolizer();

            sym1.Strokes.Clear();
            SimpleStroke stroke11 = new SimpleStroke(Color.DarkGray);

            sym1.Strokes.Add(stroke11);
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();

            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Name       = "simple line";
            cust1.Category   = "Transportation";
            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();

            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);

            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);

            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();

            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Name       = "Road";
            cust2.Category   = "Transportation";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();

            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);

            stroke3.DashStyle = DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();

            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category   = "Transportation";
            cust3.Name       = "Path";
            lst.Add(cust3);

            LineSymbolizer sym4 = new LineSymbolizer();

            sym4.Strokes.Clear();
            SimpleStroke stroke41 = new SimpleStroke(4.5, Color.Gray);
            SimpleStroke stroke42 = new SimpleStroke(2.5, Color.Yellow);
            SimpleStroke stroke43 = new SimpleStroke(0.5, Color.Gray);

            sym4.Strokes.Add(stroke41);
            sym4.Strokes.Add(stroke42);
            sym4.Strokes.Add(stroke43);
            CustomLineSymbolizer cust4 = new CustomLineSymbolizer();

            cust4.Symbolizer = sym4;
            cust4.UniqueName = "line_0004";
            cust4.Category   = "Transportation";
            cust4.Name       = "Highway";
            lst.Add(cust4);

            LineSymbolizer sym5 = new LineSymbolizer();

            sym5.Strokes.Clear();
            CartographicStroke stroke51 = new CartographicStroke(Color.Gray);
            CartographicStroke stroke52 = new CartographicStroke(Color.LightPink);

            stroke52.Width     = 4.0;
            stroke52.Offset    = 2.5f;
            stroke52.DashStyle = DashStyle.DashDotDot;
            sym5.Strokes.Add(stroke51);
            sym5.Strokes.Add(stroke52);
            CustomLineSymbolizer cust5 = new CustomLineSymbolizer();

            cust5.Symbolizer = sym5;
            cust5.UniqueName = "line_0005";
            cust5.Category   = "Boundaries";
            cust5.Name       = "Boundary 1";
            lst.Add(cust5);

            LineSymbolizer sym6 = new LineSymbolizer();

            sym6.Strokes.Clear();
            SimpleStroke stroke53 = new SimpleStroke(Color.DarkBlue);
            SimpleStroke stroke54 = new SimpleStroke(Color.LightBlue);

            stroke53.Width = 3;
            sym6.Strokes.Add(stroke53);
            sym6.Strokes.Add(stroke54);
            CustomLineSymbolizer cust6 = new CustomLineSymbolizer();

            cust6.Symbolizer = sym6;
            cust6.UniqueName = "line_0006";
            cust6.Category   = "Rivers";
            cust6.Name       = "River";
            lst.Add(cust6);

            return(lst);
        }
        private static List<CustomLineSymbolizer> GetLineSymbols()
        {
            List<CustomLineSymbolizer> lst = new List<CustomLineSymbolizer>();

            LineSymbolizer sym1 = new LineSymbolizer();
            sym1.Strokes.Clear();
            SimpleStroke stroke11 = new SimpleStroke(Color.DarkGray);
            sym1.Strokes.Add(stroke11);
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();
            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Name = "simple line";
            cust1.Category = "Transportation";
            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();
            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);
            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);
            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();
            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Name = "Road";
            cust2.Category = "Transportation";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();
            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);
            stroke3.DashStyle = DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();
            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category = "Transportation";
            cust3.Name = "Path";
            lst.Add(cust3);

            LineSymbolizer sym4 = new LineSymbolizer();
            sym4.Strokes.Clear();
            SimpleStroke stroke41 = new SimpleStroke(4.5, Color.Gray);
            SimpleStroke stroke42 = new SimpleStroke(2.5, Color.Yellow);
            SimpleStroke stroke43 = new SimpleStroke(0.5, Color.Gray);
            sym4.Strokes.Add(stroke41);
            sym4.Strokes.Add(stroke42);
            sym4.Strokes.Add(stroke43);
            CustomLineSymbolizer cust4 = new CustomLineSymbolizer();
            cust4.Symbolizer = sym4;
            cust4.UniqueName = "line_0004";
            cust4.Category = "Transportation";
            cust4.Name = "Highway";
            lst.Add(cust4);

            LineSymbolizer sym5 = new LineSymbolizer();
            sym5.Strokes.Clear();
            CartographicStroke stroke51 = new CartographicStroke(Color.Gray);
            CartographicStroke stroke52 = new CartographicStroke(Color.LightPink);
            stroke52.Width = 4.0;
            stroke52.Offset = 2.5f;
            stroke52.DashStyle = DashStyle.DashDotDot;
            sym5.Strokes.Add(stroke51);
            sym5.Strokes.Add(stroke52);
            CustomLineSymbolizer cust5 = new CustomLineSymbolizer();
            cust5.Symbolizer = sym5;
            cust5.UniqueName = "line_0005";
            cust5.Category = "Boundaries";
            cust5.Name = "Boundary 1";
            lst.Add(cust5);

            LineSymbolizer sym6 = new LineSymbolizer();
            sym6.Strokes.Clear();
            SimpleStroke stroke53 = new SimpleStroke(Color.DarkBlue);
            SimpleStroke stroke54 = new SimpleStroke(Color.LightBlue);
            stroke53.Width = 3;
            sym6.Strokes.Add(stroke53);
            sym6.Strokes.Add(stroke54);
            CustomLineSymbolizer cust6 = new CustomLineSymbolizer();
            cust6.Symbolizer = sym6;
            cust6.UniqueName = "line_0006";
            cust6.Category = "Rivers";
            cust6.Name = "River";
            lst.Add(cust6);

            return lst;
        }
        private static List<CustomSymbolizer> getBasicLineSymbols()
        {
            List<CustomSymbolizer> lst = new List<CustomSymbolizer>();

            LineSymbolizer sym1 = new LineSymbolizer();
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer();
            cust1.Symbolizer = sym1;
            cust1.UniqueName = "line_0001";
            cust1.Category = "default";
            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();
            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);
            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);
            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer();
            cust2.Symbolizer = sym2;
            cust2.UniqueName = "line_0002";
            cust2.Category = "default";
            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();
            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown);
            stroke3.DashStyle = DashStyle.Dash;
            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer();
            cust3.Symbolizer = sym3;
            cust3.UniqueName = "line_0003";
            cust3.Category = "travel";
            cust3.Name = "path";
            lst.Add(cust3);
            return lst;
        }
        private static List <CustomLineSymbolizer> GetLineSymbols()
        {
            List <CustomLineSymbolizer> lst = new List <CustomLineSymbolizer>();

            LineSymbolizer sym1 = new LineSymbolizer();

            sym1.Strokes.Clear();
            SimpleStroke stroke11 = new SimpleStroke(Color.DarkGray);

            sym1.Strokes.Add(stroke11);
            CustomLineSymbolizer cust1 = new CustomLineSymbolizer
            {
                Symbolizer = sym1,
                UniqueName = "line_0001",
                Name       = "simple line",
                Category   = "Transportation"
            };

            lst.Add(cust1);

            LineSymbolizer sym2 = new LineSymbolizer();

            sym2.Strokes.Clear();
            SimpleStroke stroke1 = new SimpleStroke(2.5, Color.Brown);

            sym2.Strokes.Add(stroke1);
            SimpleStroke stroke0 = new SimpleStroke(1.0, Color.Yellow);

            sym2.Strokes.Add(stroke0);
            CustomLineSymbolizer cust2 = new CustomLineSymbolizer
            {
                Symbolizer = sym2,
                UniqueName = "line_0002",
                Name       = "Road",
                Category   = "Transportation"
            };

            lst.Add(cust2);

            LineSymbolizer sym3 = new LineSymbolizer();

            sym3.Strokes.Clear();
            CartographicStroke stroke3 = new CartographicStroke(Color.Brown)
            {
                DashStyle = DashStyle.Dash
            };

            sym3.Strokes.Add(stroke3);
            CustomLineSymbolizer cust3 = new CustomLineSymbolizer
            {
                Symbolizer = sym3,
                UniqueName = "line_0003",
                Category   = "Transportation",
                Name       = "Path"
            };

            lst.Add(cust3);

            LineSymbolizer sym4 = new LineSymbolizer();

            sym4.Strokes.Clear();
            SimpleStroke stroke41 = new SimpleStroke(4.5, Color.Gray);
            SimpleStroke stroke42 = new SimpleStroke(2.5, Color.Yellow);
            SimpleStroke stroke43 = new SimpleStroke(0.5, Color.Gray);

            sym4.Strokes.Add(stroke41);
            sym4.Strokes.Add(stroke42);
            sym4.Strokes.Add(stroke43);
            CustomLineSymbolizer cust4 = new CustomLineSymbolizer
            {
                Symbolizer = sym4,
                UniqueName = "line_0004",
                Category   = "Transportation",
                Name       = "Highway"
            };

            lst.Add(cust4);

            LineSymbolizer sym5 = new LineSymbolizer();

            sym5.Strokes.Clear();
            CartographicStroke stroke51 = new CartographicStroke(Color.Gray);
            CartographicStroke stroke52 = new CartographicStroke(Color.LightPink)
            {
                Width     = 4.0,
                Offset    = 2.5f,
                DashStyle = DashStyle.DashDotDot
            };

            sym5.Strokes.Add(stroke51);
            sym5.Strokes.Add(stroke52);
            CustomLineSymbolizer cust5 = new CustomLineSymbolizer
            {
                Symbolizer = sym5,
                UniqueName = "line_0005",
                Category   = "Boundaries",
                Name       = "Boundary 1"
            };

            lst.Add(cust5);

            LineSymbolizer sym6 = new LineSymbolizer();

            sym6.Strokes.Clear();
            SimpleStroke stroke53 = new SimpleStroke(Color.DarkBlue);
            SimpleStroke stroke54 = new SimpleStroke(Color.LightBlue);

            stroke53.Width = 3;
            sym6.Strokes.Add(stroke53);
            sym6.Strokes.Add(stroke54);
            CustomLineSymbolizer cust6 = new CustomLineSymbolizer
            {
                Symbolizer = sym6,
                UniqueName = "line_0006",
                Category   = "Rivers",
                Name       = "River"
            };

            lst.Add(cust6);

            return(lst);
        }
示例#7
0
 public ILineSymbolizer ToLineSymbolizer()
 {
     SimpleStroke stBase = new SimpleStroke(this.LineSize,this.Color.ToDrawingColor());
     SimpleStroke stBorder = new SimpleStroke(this.LineSize+this.LineBorderSize , this._lineBorderColor .ToDrawingColor());
     LineSymbolizer line = new LineSymbolizer(new SimpleStroke[] { stBorder,stBase });
     return line;
 }