milespratt / bingmaps-react

An easy to use Bing Maps React component.
https://bingmaps-react.netlify.app
MIT License
21 stars 19 forks source link

sj_evt is not defined #75

Open janBock opened 7 months ago

janBock commented 7 months ago

I am getting this in the console when trying to switch to streetside view. image

I have tried to disable streetside view with either the disableStreetside attribute in the BingMapsReact component or with this config under viewOptions and/or mapOptions.

Any insight on either how to solve the issue and allow streetside, or to disable streetside view, as its not a requirement for my application.

TIA :)

dangrussell commented 3 months ago

This is an underlying issue in the Bing Maps V8 Web Control script ( https://www.bing.com/api/maps/mapcontrol ).

You can see others with this issue here: https://learn.microsoft.com/en-us/answers/questions/1464866/bing-maps-console-error-occurs-on-direction-module

The error is annoying but shouldn't actually affect your app.

This doesn't truly fix the issue, but you can suppress the error by manually declaring a global variable in your app called sj_evt with something like this:

(window as any).sj_evt = undefined;