Approved
Last Updated: 16 Aug 2018 12:36 by ADMIN
ADMIN
Martin Ivanov
Created on: 27 Jul 2016 13:56
Category: Map
Type: Bug Report
1
Map: The providers order in the visual tree is wrong when the map source of a provider is updated at runtime
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]);
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
2 comments
ADMIN
Martin
Posted on: 16 Aug 2018 12:36
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
Jason D
Posted on: 16 Mar 2018 14:54
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.