ThinkGeo.com    |     Documentation    |     Premium Support

Ms14 trackoverlay

Hi,

From the demo sample https://docs.thinkgeo.com/products/desktop-maps/quickstart-winforms/ I try to set a TrackOverlay but got the following error :
System.Collections.Generic.KeyNotFoundException: ‘The given key ‘TrackInteractiveOverlay’ was not present in the dictionary.’

here is the code, I just added the line about the trackoverlay at the end

private async void Form_Load(object? sender, EventArgs e)
{
// Set the map’s unit of measurement to meters(Spherical Mercator)
mapView.MapUnit = GeographyUnit.Meter;

// Add Cloud Maps as a background overlay
var thinkGeoCloudVectorMapsOverlay = new ThinkGeoCloudVectorMapsOverlay
{
ClientId = “AOf22-EmFgIEeK4qkdx5HhwbkBjiRCmIDbIYuP8jWbc~”,
ClientSecret = “xK0pbuywjaZx4sqauaga8DMlzZprz0qQSjLTow90EhBx5D8gFd2krw~~”,
MapType = ThinkGeoCloudVectorMapsMapType.Light,
TileCache = new FileRasterTileCache(@".\cache", “thinkgeo_vector_light”)
};
mapView.Overlays.Add(thinkGeoCloudVectorMapsOverlay);

// Set the map extent
mapView.CurrentExtent = MaxExtents.ThinkGeoMaps;

mapView.TrackOverlay = new TrackInteractiveOverlay();

await mapView.RefreshAsync();
}

I am using the last 14 beta096, this kind of code was working in MS12