none
Bing Maps v8 seems to be hijacking my framework's AJAX calls RRS feed

  • Question

  • I was tracking down a VS browserlink error - seems to have stopped working with Bing v8, but I never used it so I disabled it - no more problem.

    But I encountered something interesting while debugging. 

    Bing Maps seems to route all of my framework's AJAX calls through itself.

    This is the line of code my framework is calling: xhr.send(requestOptions.data);

    Stepping into that line sends me to line 14 of mapcontrol running this code: The send.call(this,n)}; where this is an XMLHttpRequest type and n is the querystring for my API call. 

    Hmmm... Should this be happening?

    Monday, August 28, 2017 6:31 PM

Answers

  • Depending on which JavaScript framework you are using, this may be expected. We have found that some JavaScript frameworks overwrite the built in XMLHttpRequest class with their own custom versions and actually break the built in class. When this occurs the Bing Maps V8 control creates a modified version which passes map related calls through the standard class and all other calls through the modified version created by your JavaScript framework. 

    [Blog] [twitter] [LinkedIn]


    Monday, August 28, 2017 7:08 PM

All replies

  • Depending on which JavaScript framework you are using, this may be expected. We have found that some JavaScript frameworks overwrite the built in XMLHttpRequest class with their own custom versions and actually break the built in class. When this occurs the Bing Maps V8 control creates a modified version which passes map related calls through the standard class and all other calls through the modified version created by your JavaScript framework. 

    [Blog] [twitter] [LinkedIn]


    Monday, August 28, 2017 7:08 PM
  • Ok, that fits with what I am seeing and Ext is so dependent on xhr that I would not put it past them to overwrite the built in version.

    Thanks, Brad

    Monday, August 28, 2017 8:35 PM