layers.Add("osm_place_city_point", GetPlaceCityLabelLayer()); layers.Add("osm_place_city_town_point", GetPlaceCityTownLabelLayer()); layers.Add("osm_water_large_polygon", GetWaterLargePolygonLayer()); layers.Add("ne_road20m_linestring", GetRoad20mLinestringLayer()); layers.Add("osm_road3m_linestring", GetRoad3mLinestringLayer()); layers.Add("osm_road_streets_linestring", GetStreetRoadLinestringLayer()); layers.Add("osm_contruct_large_polygon", GetLargeConstructPolygonLayer()); layers.Add("osm_boundary_country_state_linestring", GetCountryStateBoundaryLinestringLayer()); layers.Add("osm_boundary_country_state_county_linestring", GetCountryStateCountyBoundaryLinestringLayer()); private FeatureLayer GetCountryStateCountyBoundaryLinestringLayer() { FeatureLayer osm_boundary_country_state_county_linestring = GetFeatureLayer("osm_boundary_country_state_county_linestring"); ValueStyle boundaryLevel12ValueStyle = new ValueStyle("admin_level", new Collection() { new ValueItem("2", GetBoundaryNationalLineStyle(3)), new ValueItem("4", GetBoundaryStateLineStyle(2)), new ValueItem("6", GetBoundaryCountyLineStyle(1)) }); osm_boundary_country_state_county_linestring.ZoomLevelSet.ZoomLevel12.CustomStyles.Add(boundaryLevel12ValueStyle); osm_boundary_country_state_county_linestring.ZoomLevelSet.ZoomLevel12.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level13; return osm_boundary_country_state_county_linestring; } private FeatureLayer GetCountryStateBoundaryLinestringLayer() { FeatureLayer osm_boundary_country_state_linestring = GetFeatureLayer("osm_boundary_country_state_linestring"); ValueStyle boundaryLevel8ValueStyle = new ValueStyle("admin_level", new Collection() { new ValueItem("2", GetBoundaryNationalLineStyle(2)), new ValueItem("4", GetBoundaryStateLineStyle(1)) }); osm_boundary_country_state_linestring.ZoomLevelSet.ZoomLevel08.CustomStyles.Add(boundaryLevel8ValueStyle); osm_boundary_country_state_linestring.ZoomLevelSet.ZoomLevel08.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level11; return osm_boundary_country_state_linestring; } private FeatureLayer GetLargeConstructPolygonLayer() { FeatureLayer osm_construct_large_polygon = GetFeatureLayer("osm_construct_large_polygon"); SetWhereClause(osm_construct_large_polygon, " ORDER BY osm_area desc "); FilterStyle buildingFilterStyle = new FilterStyle(); buildingFilterStyle.Conditions.Add(new FilterCondition("building", "^(?!).*?$")); buildingFilterStyle.Styles.Add(GetBuildingAreaStyle()); OsmWorldMapKitCompositeStyle compositeStyle = new OsmWorldMapKitCompositeStyle(); compositeStyle.Styles.Add(buildingFilterStyle); osm_construct_large_polygon.ZoomLevelSet.ZoomLevel14.CustomStyles.Add(compositeStyle); osm_construct_large_polygon.ZoomLevelSet.ZoomLevel14.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level15; return osm_construct_large_polygon; } private FeatureLayer GetStreetRoadLinestringLayer() { FeatureLayer osm_road_streets_linestring = GetFeatureLayer("osm_road_streets_linestring"); SetWhereClause(osm_road_streets_linestring, " ORDER BY way_z_order "); osm_road_streets_linestring.ZoomLevelSet.ZoomLevel14.CustomStyles.Add(GetRoadLevel14Styles()); osm_road_streets_linestring.ZoomLevelSet.ZoomLevel15.CustomStyles.Add(GetRoadLevel15Styles()); return osm_road_streets_linestring; } private FeatureLayer GetRoad3mLinestringLayer() { FeatureLayer osm_road3m_linestring = GetFeatureLayer("osm_road5m_linestring"); osm_road3m_linestring.Name = "osm_road3m_linestring"; SetWhereClause(osm_road3m_linestring, " ORDER BY way_z_order "); osm_road3m_linestring.ZoomLevelSet.ZoomLevel09.CustomStyles.Add(GetRoadLevel09Styles()); osm_road3m_linestring.ZoomLevelSet.ZoomLevel10.CustomStyles.Add(GetRoadLevel10Styles()); osm_road3m_linestring.ZoomLevelSet.ZoomLevel11.CustomStyles.Add(GetRoadLevel11Styles()); return osm_road3m_linestring; } private FeatureLayer GetRoad20mLinestringLayer() { FeatureLayer ne_road20m_linestring = GetFeatureLayer("ne_road10m_linestring"); ne_road20m_linestring.Name = "ne_road20m_linestring"; SetWhereClause(ne_road20m_linestring, " AND ((\"scalerank\" <= '4')) "); ne_road20m_linestring.ZoomLevelSet.ZoomLevel06.CustomStyles.Add(GetHighwayLineStyle(1)); return ne_road20m_linestring; } private FeatureLayer GetWaterLargePolygonLayer() { FeatureLayer osm_water_large_polygon = GetFeatureLayer("osm_water_large_polygon"); osm_water_large_polygon.ZoomLevelSet.ZoomLevel11.CustomStyles.Add(GetWaterAreaStyle()); osm_water_large_polygon.ZoomLevelSet.ZoomLevel11.CustomStyles.Add(GetWaterLabelTextStyle("name", 6)); osm_water_large_polygon.ZoomLevelSet.ZoomLevel11.CustomStyles.Add(GetWaterLabelTextStyle("name:en", 6)); osm_water_large_polygon.ZoomLevelSet.ZoomLevel11.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level13; return osm_water_large_polygon; } private FeatureLayer GetPlaceCityLabelLayer() { FeatureLayer osm_place_city_point = GetFeatureLayer("osm_place_city_point"); ValueStyle placeLevel08ValueStyle = new ValueStyle("place", new Collection() { new ValueItem("city", GetGeneralPurposeTextStyle("name", 7)) }); osm_place_city_point.ZoomLevelSet.ZoomLevel08.CustomStyles.Add(placeLevel08ValueStyle); return osm_place_city_point; } private FeatureLayer GetPlaceCityTownLabelLayer() { FeatureLayer osm_place_city_town_point = GetFeatureLayer("osm_place_city_town_point"); SetWhereClause(osm_place_city_town_point, " ORDER BY place "); ValueStyle placeLevel09ValueStyle = new ValueStyle("place", new Collection() { new ValueItem("city", GetGeneralPurposeTextStyle("name", 8)), new ValueItem("town", GetGeneralPurposeTextStyle("name", 7)) }); osm_place_city_town_point.ZoomLevelSet.ZoomLevel09.CustomStyles.Add(placeLevel09ValueStyle); osm_place_city_town_point.ZoomLevelSet.ZoomLevel09.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level10; return osm_place_city_town_point; }