Reputation: 185
I use C# to download and save in cache some maps from OpenStreetMaps. Problem it that I do not know when map is loaded ( downloaded from WEB)
using GMap.NET;
using GMap.NET.MapProviders;
GMaps.Instance.Mode = AccessMode.ServerAndCache;
map.CacheLocation = @"maps";
map.Zoom = zoom;
map.Position = new PointLatLng(lat, lng);
That is how I set position on map. I do not know when that map is loaded from server to be sure that later it will be available from Cache when I use OnlyCache.
Upvotes: 1
Views: 838
Reputation: 34429
I down loaded GMAP.NET source code which has sample code. Found they are using events
MainMap.OnMapTypeChanged += new MapTypeChanged(MainMap_OnMapTypeChanged);
MainMap.OnMapZoomChanged += new MapZoomChanged(MainMap_OnMapZoomChanged);
MainMap.OnPositionChanged += new PositionChanged(MainMap_OnPositionChanged);
Upvotes: 1