When you have two providers - BingMapProvider and custom TiledProvider - and the map source of the second provider (the custom one) is changed, the updated provider is drawn under the provider defined before it in the Providers collection (the BingMapProvider). To work this around you can call the BingMapProvider's SetMapSource() method after the source of the custom provider is changed. // set the custom provider source bingMapProvider.SetMapSource(bingMapProvider.SupportedSources[0]);
I guess not many people are using custom providers. However this is super high priority for us. I moved all of our map code to be completely in WPF. When I did that, this issue re-appeared. I spent 1-2 weeks trying to work around it. The SetMapSource solution does not work for me. The workaround I posted below works most of the time, but not all. If this could be fixed in conjuction with Providers binding, the whole thing would just magically work in a nice MVVM fashion and I could delete a lot of code. I have not been able to reproduce using a sample project and it's very hard to find the time to attempt it.
https://feedback.telerik.com/wpf/1351094-map-the-radmap-providers-property-should-support-databinding-to-a-collection-of-mapproviderbase-objects
Hi Jason, Thank you for sharing your solution here. I hope this would help also someone else. As for the issue, currently this is not fixed and it isn't included in our current planning. I would suggest you to follow the feedback item so that you are notified as soon as there is any update on i ts status. Regards, Martin Ivanov Technical Support Engineer
I upgraded from 2014 to 2018 and this problem still exists. However, I found another workaround due to my code order. If the BingMapProvider is inserted at position 0 *after* the custom provider has already been added, the problem goes away. I noticed this because my Bing provider is added last because I don't know which base map provider I'll be using until runtime. I confirmed this workaround works for both 2014 and 2018 versions.