Hello,
I have Shape file of Pakistan and I am coloring the provinces based on number of projects. For this I have applied Visual Style and has given colors based on some criteria. It is loading the colors but not accordingly, it is loading at its own. Following is my code.
Dim objDatatable As DataTableDim pkMapLayer As New CustomDataShapeFileFeatureLayer(Server.MapPath("~/Content/Shapes/PAK_adm1.shp"))objDatatable = GetThematicAreaWsProjects(lAreaID, lThematicAreaID)pkMapLayer.RequireIndex = FalsepkMapLayer.InitDictionaries("Area", objDatatable, "Colour_map")
Dim valueStyle As New ValueStyle()valueStyle.ColumnName = "Colour_map"valueStyle.ValueItems.Add(New ValueItem("1", AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.LightPink, GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("2", AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(255, 255, 79, 79), GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("3", AreaStyles.CreateSimpleAreaStyle(GeoColor.FromArgb(255, 255, 179, 79), GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("4", AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.Red, GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("5", AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.RosyBrown, GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("6", AreaStyles.CreateSimpleAreaStyle(GeoColor.StandardColors.DarkRed, GeoColor.StandardColors.Black)))valueStyle.ValueItems.Add(New ValueItem("Area", TextStyles.Country1("[Area]")))pkMapLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle)
pkMapLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20Return pkMapLayer
Where I have colour_map =1 , it is loading color for Value 4 i-e Red and same is the case for others. I need to resolve this asap.
Thanks in advance.
Naeem

