Пример #1
0
        private static ILayer CreateLabelLayer(WFSProvider provider)
        {
            // Labels
            // Labels are collected when parsing the geometry. So there's just one 'GetFeature' call necessary.
            // Otherwise (when calling twice for retrieving labels) there may be an inconsistent read...
            // If a label property is set, the quick geometry option is automatically set to 'false'.
            const string labelField = "CAMM_NOME_DE";

            provider.Labels.Add(labelField);

            return(new Layer("labels")
            {
                DataSource = provider,
                MaxVisible = 350,
                Style = new LabelStyle
                {
                    CollisionDetection = false,
                    ForeColor = Color.Black,
                    Font = new Font {
                        FontFamily = "GenericSerif", Size = 10
                    },
                    HorizontalAlignment = LabelStyle.HorizontalAlignmentEnum.Center,
                    LabelColumn = labelField
                }
            });
        }
Пример #2
0
        private static WFSProvider CreateStatesProvider(string getCapabilitiesUri)
        {
            var statesProvider = new WFSProvider(getCapabilitiesUri, "topp", "states", WFSProvider.WFSVersionEnum.WFS_1_0_0)
            {
                QuickGeometries      = false,
                GetFeatureGetRequest = true,
            };

            return(statesProvider);
        }
Пример #3
0
 private static ILayer CreateWfsLayer(WFSProvider provider)
 {
     return(new Layer(layerName)
     {
         Style = new VectorStyle {
             Fill = new Brush {
                 Color = Color.FromArgb(192, 255, 0, 0)
             }
         },
         DataSource = provider,
         IsMapInfoLayer = true
     });
 }
Пример #4
0
 private static ILayer CreateWfsLayer(WFSProvider provider)
 {
     return(new Layer("COMUNI_AMMINISTRATIVI")
     {
         Style = new VectorStyle {
             Fill = new Brush {
                 Color = Color.Red
             }
         },
         DataSource = provider,
         IsMapInfoLayer = true
     });
 }
Пример #5
0
        private static Layer CreateRoadsLayer(string getCapabilitiesUri)
        {
            var roadsProvider = new WFSProvider(getCapabilitiesUri, "tiger", "tiger_roads", WFSProvider.WFSVersionEnum.WFS_1_0_0)
            {
                QuickGeometries = true,
                MultiGeometries = false
            };

            return(new Layer("Roads")
            {
                DataSource = roadsProvider
            });
        }
Пример #6
0
        private static WFSProvider CreateWfsProvider(string getCapabilitiesUri)
        {
            var provider = new WFSProvider(getCapabilitiesUri, "p_bz-cadastre", "COMUNI_AMMINISTRATIVI",
                                           WFSProvider.WFSVersionEnum.WFS_1_1_0)
            {
                QuickGeometries      = false,
                GetFeatureGetRequest = true,
                CRS    = "EPSG:25832",
                Labels = new List <string> {
                    "CAMM_NOME_DE"
                }
            };

            return(provider);
        }
Пример #7
0
        private static WFSProvider CreateWfsProvider(string getCapabilitiesUri)
        {
            var provider = new WFSProvider(getCapabilitiesUri, nsPrefix, layerName,
                                           WFSProvider.WFSVersionEnum.WFS_1_1_0)
            {
                QuickGeometries      = false,
                GetFeatureGetRequest = true,
                CRS    = crs,
                Labels = new List <string> {
                    labelField
                }
            };

            return(provider);
        }
Пример #8
0
        private static ILayer CreateLandmarksLayer(string getCapabilitiesUri)
        {
            var landmarksProvider = new WFSProvider(getCapabilitiesUri, "tiger", "poly_landmarks", WFSProvider.WFSVersionEnum.WFS_1_0_0)
            {
                QuickGeometries = true
            };

            return(new Layer("Landmarks")
            {
                Style = new VectorStyle {
                    Fill = new Brush {
                        Color = Color.Blue
                    }
                },
                DataSource = landmarksProvider
            });
        }
Пример #9
0
        private static Layer CreateStatesWithFilterLayer(string serviceUri)
        {
            var newStarProvider = new WFSProvider(serviceUri, "topp", "http://www.openplans.org/topp", "states", "the_geom",
                                                  GeometryTypeEnum.MultiSurfacePropertyType, WFSProvider.WFSVersionEnum.WFS_1_1_0)
            {
                OgcFilter = new PropertyIsLikeFilter_FE1_1_0("STATE_NAME", "New*")
            };

            return(new Layer("New*")
            {
                Style = new VectorStyle {
                    Fill = new Brush {
                        Color = Color.Yellow
                    }
                },
                DataSource = newStarProvider
            });
        }
Пример #10
0
        private static ILayer CreateStatesWithAdvancedFilter(string getCapabilitiesUri)
        {
            var statesAndHouseholdsProvider = new WFSProvider(getCapabilitiesUri, "topp", "states",
                                                              WFSProvider.WFSVersionEnum.WFS_1_1_0)
            {
                OgcFilter       = CreateStatesAndHouseholdsFilter(),
                QuickGeometries = true
            };

            return(new Layer("SelectedStatesAndHousholds")
            {
                Style = new VectorStyle {
                    Fill = new Brush {
                        Color = Color.Green
                    }
                },
                DataSource = statesAndHouseholdsProvider
            });
        }