BingMap - getting prototype of null error

后端 未结 4 425
无人共我
无人共我 2021-01-15 14:24

I have searched google and stackoverflow, but could not find a solution for this issue. I am loading the map like this, in my vi

4条回答
  •  鱼传尺愫
    2021-01-15 14:53

    In the map script URL you are using a different callback function that you o function to load the map. (loadScenario vs GetMap). Also, it looks like you are using the redirect URL rather than the documented map script URL (this will likely break in the future). Try changing the map script URL to this:

    
    

    Not sure what bing.js is in your app. Assuming this is where you have you map load code. You will want to load this before the map script otherwise the map script may load before your code does and thus try to load the map before your GetMap function is loaded into the page.

    Alternatively, you may find this code sample useful: https://github.com/Microsoft/BingMapsV8CodeSamples/blob/master/Samples/Experimental/Map_WithAngular1.html

提交回复
热议问题