question

ArturoGonzlez-8007 avatar image
0 Votes"
ArturoGonzlez-8007 asked ·

authenticateClientAndRetrieveSessionId error on AutocompleteMaps

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
snippet.jpg (115.3 KiB)
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

ArturoGonzlez-8007 avatar image
0 Votes"
ArturoGonzlez-8007 answered ·

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



snippetfixed.jpg (83.4 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.