Re-using Bing session

3 posts, 0 answers
  1. Jason D
    Jason D avatar
    82 posts
    Member since:
    Jan 2011

    Posted 29 Aug 2016 Link to this post


    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.

    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. Dinko
    Dinko avatar
    416 posts

    Posted 01 Sep 2016 Link to this post

    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.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  3. Jason D
    Jason D avatar
    82 posts
    Member since:
    Jan 2011

    Posted 02 Sep 2016 in reply to Dinko Link to this post

    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.
Back to Top