authenticateClientAndRetrieveSessionId error on AutocompleteMaps

Arturo González 96 Reputation points
2021-04-22T20:32:08.787+00:00

Hi!
I'm implementing Bing Maps on my webpage in order to be able to pick an address using the AutoSuggest module (from AutocompleteMaps). What I want it's something like this:
https://www.bing.com/api/maps/sdkrelease/mapcontrol/isdk/autosuggestui#JS

Unfortunately, when I click in the input field to fill the address, this error is appearing in the console:
Uncaught TypeError: Cannot read property 'authenticateClientAndRetrieveSessionId' of undefined

Any idea of what can be happening?
I already activated Bing Maps and I'm using the key they provided me.

I'm attaching a picture with how my code looks as I can paste it here90512-snippet.jpg

Thanks a lot!

Windows Maps
Windows Maps
A Microsoft app that provides voice navigation and turn-by-turn driving, transit, and walking directions.
245 questions
0 comments No comments
{count} votes

Accepted answer
  1. Arturo González 96 Reputation points
    2021-04-22T21:28:03.813+00:00

    Hi! I found a way to fix this.
    Instead of using that snippet, I used the one implemented in this example and now it works fine. After using that code, another error appeared saying I had to go to https://www.bingmapsportal.com/Application and create a new key. After adding that key, it worked like a charm.

    I'm attaching another snippet with how my code looks now in case it's helpful.

    90409-snippetfixed.jpg

    0 comments No comments

0 additional answers

Sort by: Most helpful