ThinkGeo.com    |     Blog    |     Wiki    |     Support

Shape File & google map Layer

Actually,i have set AreaStyle & ValueStyle in different method to identify structures based on it’s land use types to color each one.Here is my Code:
protected void GetColorCodes()
{
ShapeFileFeatureLayer ColourLayer = (ShapeFileFeatureLayer)((LayerOverlay)Map1.CustomOverlays[1]).Layers[“ShapeLayer”];
AreaStyle areaSt = new AreaStyle();
areaSt.OutlinePen.Color = GeoColor.StandardColors.Gray;
ValueStyle valueStyle = new ValueStyle();
valueStyle.ColumnName = “LU_TYPE”;
valueStyle.ValueItems.Add(new ValueItem(“AGRICULTURE”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,162, 222,145)))));
valueStyle.ValueItems.Add(new ValueItem(“COMMERCIAL”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,102,140,255)))));
valueStyle.ValueItems.Add(new ValueItem(“FOREST”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(130,38,153,0)))));
valueStyle.ValueItems.Add(new ValueItem(“HILLTOP_HILLSLOPE”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110, 219, 139, 238)))));
valueStyle.ValueItems.Add(new ValueItem(“INDUSTRIAL”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110, 219,139,238)))));
valueStyle.ValueItems.Add(new ValueItem(“PUBLIC SERVICES”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,247,105,144)))));
valueStyle.ValueItems.Add(new ValueItem(“PUBLIC UTILITY”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,245,245,122)))));
valueStyle.ValueItems.Add(new ValueItem(“RECREATIONAL”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,76,230,0)))));
valueStyle.ValueItems.Add(new ValueItem(“RESIDENTIAL”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110, 245, 245, 122)))));
valueStyle.ValueItems.Add(new ValueItem(“SPECIAL AREAS”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,151,219,245)))));
valueStyle.ValueItems.Add(new ValueItem(“TRANSPORT”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,206,203,202)))));
valueStyle.ValueItems.Add(new ValueItem(“VACANT”, new AreaStyle(new GeoSolidBrush(GeoColor.StandardColors.White))));
valueStyle.ValueItems.Add(new ValueItem(“WATER”, new AreaStyle(new GeoSolidBrush(GeoColor.FromArgb(110,127,223,255)))));
//valueStyle.ValueItems.Add(new ValueItem(“HOSPITAL”, new AreaStyle(new GeoSolidBrush(GeoColor.StandardColors.Magenta))));
ColourLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle);
ColourLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(areaSt);
Map1.StaticOverlay.Redraw();
}
Though i am not able to get correct layers.
Here i am attaching data image

Hi Djay,

The value style is used to display the data based on the value Item.

Based on your attached data image, it seems as a commercial district. The district contains commercial, resident, industrial and vacant building, so the map has been rendered as your definition value styles correctly.

If you are not expecting the rendered result, please check your dbf data if have related data (.dbf). If you are not sure about how to check dbf data, you can send the shape file data to us. We can help you to verify that.

Thanks
Mark