I have a Map file of type .map which has the all counties for Turkey. When I try to use that file it gives "Object reference not set to instance of an object" error. Here is my code
ShapeFileFeatureLayer worldLayer = new ShapeFileFeatureLayer(MapPath("MapData/Ilceler.MAP"));AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.FromArgb(100, GeoColor.SimpleColors.Green));ApplyUntilZoomLevel.Level20;LayerOverlay staticOverlay = new LayerOverlay();false;
worldLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle =
worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel =
staticOverlay.IsBaseOverlay =
staticOverlay.Layers.Add(worldLayer);
Map1.CustomOverlays.Add(staticOverlay);