private void DisplayMap_Load(object sender, EventArgs e) { winformsMap1.MapUnit = GeographyUnit.DecimalDegree; WorldMapKitWmsDesktopOverlay worldMapKitDesktopOverlay = new WorldMapKitWmsDesktopOverlay(); //winformsMap1.Overlays.Add(worldMapKitDesktopOverlay); winformsMap1.CurrentExtent = new RectangleShape(-139.2, 92.4, 120.9, -93.2); InMemoryFeatureLayer inmLayer = new InMemoryFeatureLayer(); inmLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1; inmLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; inmLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.Canal1; inmLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.Antarctica1; Random a = new Random(); //Point: //for (int i = 0; i < 500000; i++) //{ // inmLayer.InternalFeatures.Add(new Feature(a.Next(-180, 180), a.Next(-90, 90))); //} //winformsMap1.GeoCanvas = new WicBitmapGeoCanvas(); //Line: //for (int i = 0; i < 40000; i++) //{ // LineShape line = new LineShape("LINESTRING (" + a.Next(-180, 0) + " " + a.Next(-180, 0) + "," + a.Next(0, 180) + " " + a.Next(0, 180) + ")"); // inmLayer.InternalFeatures.Add(new Feature(line)); //} //PolyGon: //for (int i = 0; i < 400000; i++) //{ // //LineShape line = new LineShape("LINESTRING (" + a.Next(-180, 0) + " " + a.Next(-180, 0) + "," + a.Next(0, 180) + " " + a.Next(0, 180) + ")"); // inmLayer.InternalFeatures.Add(new Feature("POLYGON ((30 10, 10 20, 20 40, 40 40, 30 10))")); //} LayerOverlay overlay = new LayerOverlay(); overlay.Layers.Add(inmLayer); winformsMap1.Overlays.Add(overlay); Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); winformsMap1.Refresh(); stopwatch.Stop(); Debug.WriteLine(stopwatch.Elapsed.TotalMilliseconds); }