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 } }); }
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); }
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 }); }
private static ILayer CreateWfsLayer(WFSProvider provider) { return(new Layer("COMUNI_AMMINISTRATIVI") { Style = new VectorStyle { Fill = new Brush { Color = Color.Red } }, DataSource = provider, IsMapInfoLayer = true }); }
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 }); }
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); }
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); }
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 }); }
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 }); }
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 }); }