As I tested, when I set WorldMapKitWmsWpfOverlay to invisible, it doesn’t throw exception; I just did a simple test; could you show me the code you are using? For your second issue, I think you might mean CurrentExtentChanging event. I cannot recreate this issue neither with our latest Dll. Please try the latest Dll and try or show us you code so that I can recreate it.
var worldOverlay = new WorldMapKitWmsWpfOverlay(); worldOverlay.IsVisible = true; worldOverlay.DrawTilesProgressChanged += OnMapProgressChanged; map.Overlays.Add("WMK", worldOverlay);
If I step through the line where I set IsVisible, an exception is thrown. Maybe I need DII. How do I get this? I am still in eval mode till our purchase comes through.
I tested your code. It worked fine for me. I have been working with Map suite for a while. One think i noticed that, the exceptions are misleading.So, my suggestion is that you should check other part of the code and see if your application is generating exception else where.
i just modified the DisplayASimpleMap sample as follows: private void WpfMap_Loaded(object sender, RoutedEventArgs e) { Map1.MapUnit = GeographyUnit.DecimalDegree; Map1.CurrentExtent = new RectangleShape(-155.733, 95.60, 104.42, -81.9);
WorldMapKitWmsWpfOverlay worldOverlay = new WorldMapKitWmsWpfOverlay(); // Step over this line and a null reference exception is thrown. // If i set IsVisible to false, however,exception is not thrown. worldOverlay.IsVisible = true; Map1.Overlays.Add("WMK", worldOverlay);
Map1.Refresh(); }
That line throw an exception when IsVisible== true. It could be my DLL versions. I am using 4.0.40.
I think this is a bug in 4.0.40 which is fixed in the latest version. Now the latest build is 4.0.91.0, you can download the latest package everyday at: