This is a migrated thread and some comments may be shown as answers.

Re-using Bing session

2 Answers 82 Views
Map
This is a migrated thread and some comments may be shown as answers.
Jason D
Top achievements
Rank 1
Veteran
Jason D asked on 29 Aug 2016, 06:25 PM

Background:

Our applications have multiple maps. I tried using one map control and moving it around to whichever screen was active but that was impractical.
I also tried creating a shared list of providers amongst the map controls, but that just didn't work.

Problem:
Each map has to create its own Bing provider so each map is creating its own session. If I have 10 maps, then my application is using 10x the amount of billable transactions than it should be every time it's opened. Is it possible to "share" sessions? For example, the first provider to be created could get the session and then I could just set the other providers to use the same session ID manually?

I think I can test this but wanted to know if there any problems with doing this.

2 Answers, 1 is accepted

Sort by
0
Dinko | Tech Support Engineer
Telerik team
answered on 01 Sep 2016, 08:48 AM
Hi Jason D,

Currently, the described behavior in your post isn't supported by the RadMap control. Basically, every RadMap needs a unique provider.

A possible approach which you can try is to create different providers for every map which use the same Bing Map Accessing Key.
string id = "bingmaps_keyID";
BingMapProvider provider1 = new BingMapProvider("bingmaps_keyID") ;
BingMapProvider provider2 = new BingMapProvider("bingmaps_keyID") ;
BingMapProvider provider3 = new BingMapProvider("bingmaps_keyID") ;
 
this.radMap.Provider = provider1;
this.radMap1.Provider = provider2;
this.radMap1.Provider = provider3;
Keep in mind this is just a suggestion and we cannot say that this approach is more optimized than 3 providers using different Bing Map Accessing Key. You can consider contacting Bing Map Support for further information about this. Or you can manually test your account transactions usage when you use 3 providers with single Bing Map Accessing Key.

Regards,
Dinko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Jason D
Top achievements
Rank 1
Veteran
answered on 02 Sep 2016, 07:07 PM
Thanks. I created the session ID myself and use that for the maps. This seems to really only be an issue when using the aerial imagery. That'll do until we have time to refactor the app.
Tags
Map
Asked by
Jason D
Top achievements
Rank 1
Veteran
Answers by
Dinko | Tech Support Engineer
Telerik team
Jason D
Top achievements
Rank 1
Veteran
Share this question
or