Hi Neil,
I noted some issues (for example: the same overlay were added twice to the map, layer.Open/Close were called unnecessarily), and I simplified the code to as following. Please have another try.
private async void mapView_Loaded(object sender, RoutedEventArgs e)
{
mapView.MapUnit = GeographyUnit.Meter;
var baseOverlay = new ThinkGeoCloudRasterMapsOverlay(< client >, < clientsecret >);
baseOverlay.TileCache = new FileRasterTileCache(@".\cache", "basemap");
mapView.Overlays.Add(baseOverlay);
// Set the extent of the mapView
mapView.CurrentExtent = MaxExtents.ThinkGeoMaps;
SqliteFeatureLayer sqliteNodeLayer = new SqliteFeatureLayer(< SQLite file >, "Node", "id", "geometry");
sqliteNodeLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(PointSymbolType.Circle, 5, GeoBrushes.Red);
sqliteNodeLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(GeoPens.Red);
sqliteNodeLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(GeoBrushes.Red);
sqliteNodeLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
sqliteNodeLayer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, 3857);
LayerOverlay sqliteOverlay = new LayerOverlay();
sqliteOverlay.Layers.Add(sqliteNodeLayer);
mapView.Overlays.Add(sqliteOverlay);
SqliteFeatureLayer sqliteSectionLayer = new SqliteFeatureLayer(< SQLite file >, "InstSection", "id", "geometry");
sqliteSectionLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(GeoPens.Blue);
sqliteSectionLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
sqliteSectionLayer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, 3857);
sqliteOverlay.Layers.Add(sqliteSectionLayer);
await mapView.RefreshAsync();
}
If you still see the issues, try just loading the sqllite data without any reprojection, see if it shows up everything correctly. If it does, that means something is going on with the projection
private async void mapView_Loaded(object sender, RoutedEventArgs e)
{
mapView.MapUnit = GeographyUnit.DecimalDegree;
SqliteFeatureLayer sqliteSectionLayer = new SqliteFeatureLayer(< SQLite file >, "InstSection", "id", "geometry");
sqliteSectionLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(GeoPens.Blue);
sqliteSectionLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
LayerOverlay sqliteOverlay = new LayerOverlay();
sqliteOverlay.Layers.Add(sqliteSectionLayer);
mapView.Overlays.Add(sqliteOverlay);
sqliteSectionLayer.Open();
mapView.CurrentExtent = sqliteSectionLayer.GetBoundingBox();
await mapView.RefreshAsync();
}
Thanks,
Ben