Hi,
I have a shapefile with some points. When I load the shapefile, I want to mark the points with my ico file ( Wells.ico is a bitmap file)
How do I do this? Any code sample will be appreciated. Thanks.
Katherine
Hi,
I have a shapefile with some points. When I load the shapefile, I want to mark the points with my ico file ( Wells.ico is a bitmap file)
How do I do this? Any code sample will be appreciated. Thanks.
Katherine
This is easy. If you want to display all the point features in your layer with an icon. You can use the code below. I also let you know that you can also use a different icon for each feature based on some value of a column. See for example the sample app "Draw features based on Values" in the Styles section.
ShapeFileFeatureLayer myLayer = new ShapeFileFeatureLayer(@"..\..\Data\mypointshapefile.shp");
myLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
myLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.PointType = PointType.Bitmap;
myLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle.Image = new GeoImage(@"..\..\Data\well.gif");
LayerOverlay staticOverlay = new LayerOverlay();
staticOverlay.Layers.Add("MyLayer", myLayer);
winformsMap1.Overlays.Add(staticOverlay);