Hello,
I'm trying to use MultipleShapeFileFeatureLayer and getting followng exception when WinForm map control tries to draw the layer.
System.InvalidOperationException: Your input index is out of bound
Here is the piece of code I'm using to create MutipleShapeFileFeatureLayer:
string[] shapeFiles = new string[] { @"c:\data\Folder1\1.shp", @"c:\data\Folder2\1.shp" };
string[] indexFiles = new string[] { @"c:\data\Folder3\1.midx", @"c:\data\Folder3\1.midx" };
MultipleShapeFileFeatureLayer.BuildIndex(shapeFiles, indexFiles, BuildIndexMode.DoNotRebuild);
MultipleShapeFileFeatureLayer shapeLayer = new MultipleShapeFileFeatureLayer(shapeFiles, indexFiles);
ValueStyle valueStyle = new ValueStyle();
valueStyle.ColumnName = "Column1";
valueStyle.ValueItems.Add(new ValueItem("value1", PointStyles.CreateSimpleCircleStyle(GeoColor.GetRandomGeoColor(RandomColorType.All), 2)));
valueStyle.ValueItems.Add(new ValueItem("value2", PointStyles.CreateSimpleCircleStyle(GeoColor.GetRandomGeoColor(RandomColorType.All), 2)));
shapeLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valueStyle);
shapeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay groupLayer = new LayerOverlay();
groupLayer.Name = "test1";
groupLayer.Layers.Add(shapeLayer);
winformsMap1.Overlays.Add(layerKey, groupLayer);
winformsMaps1.Refresh(); // The exception is being thrown here.