none
Bing Maps session get expired RRS feed

  • Question

  • Hi Team,

    We added the Search location Module in our project with the help of below link:

    https://github.com/Microsoft/BingMapsV8CodeSamples/blob/master/Samples/Search/Geocode.html

    In our project, we kept the browser (Where Bing Maps loaded) alone for 10 mins to process our business logic in background. Once the logic process complete, we called the searchManager request to get location geocode,

    But this request get failed and we get the error in errorCallback.

    If we called the same request initially when Bing Maps load, it get succeed.

    I think its happens because of session expired, Could you please let me know, how i can handle this.

    Thanks

    Vikas

    Monday, May 25, 2020 2:38 PM

All replies

  • Hi Vikas,

    The session key is meant for use with the V8 control and will expire faster for a Basic Key than an Enterprise key but is not intended to work indefinitely. You have two choices when the Session Key expires:

    1. Use the Bing Maps key for the call

    2. Reload the V8 control and get a new session key.

    Sincerely,

    IoTGirl

    Monday, May 25, 2020 5:08 PM
    Owner
  • Hi Team,

    For choice two, Is there way that i can find that my session key is expire or not.

    Waiting for reply.

    Thanks,

    Vikas

    Monday, May 25, 2020 5:23 PM
  • Hi Vikas,

    The call in the sample is using the Bing Maps Key for an ASYNC call not a session key. See <script type='text/javascript' src='https://www.bing.com/api/maps/mapcontrol?callback=GetMap&key=[YOUR_BING_MAPS_KEY]' async defer></script>

    Sincerely,

    IoTGirl

    Monday, May 25, 2020 6:21 PM
    Owner