Hi,
I am currently evaluating the MapSuite WPF edition with the World Map Kit SQLite database. I can’t seem to get the map to display. I have read through multiple posts on this site, including this one which matched my issue almost perfectly: Using of SqliteFeatureSource and WPF Map Suite 9
I am not able to access the Internet at all on the machine I am developing on, although I can transfer files to it. I am using a local copy of the WMK SQLite database.
I have copied the code that Don posted but nothing comes up besides the zoom bar and the ThinkGeo logo.
After setting some breakpoints, I can see that my code isn’t getting past the “wpfMap1.CurrentExtent = sqlLayer.GetBoundingBox();
” line. Referencing the other post, I have allowed the program to run for about a half hour to leave time for the map to load. It still isn’t appearing. What should I do to get this to work?
private void Window_Loaded(object sender, RoutedEventArgs e)
{
wpfMap1.MapUnit = GeographyUnit.Meter;
LayerOverlay overlay = new LayerOverlay();
overlay.TileType = TileType.MultipleTile;
SqliteFeatureLayer sqlLayer = new SqliteFeatureLayer(@"Data Source=C:\\Documents\WorldMapKitData\WorldMapKit4326_20141115\WorldMapKit4326.sqlite;Version=3", "ne_ocean1m_polygon", "id", "geometry");
sqlLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.Capital1;
sqlLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.GeographicColors.Grass);
sqlLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
overlay.Layers.Add(sqlLayer);
sqlLayer.Open();
wpfMap1.CurrentExtent = sqlLayer.GetBoundingBox();
sqlLayer.FeatureSource.BeginTransaction();
sqlLayer.FeatureSource.AddFeature(new Feature(wpfMap1.CurrentExtent.GetCenterPoint()));
sqlLayer.FeatureSource.CommitTransaction();
wpfMap1.Overlays.Add(overlay);
wpfMap1.Refresh();
}
I appreciate any help.
Thank you.