none
Unable to use a Module in Bing Maps RRS feed

  • Question

  • Hello.

    I seem to be having trouble using the new clustering module within bing maps. Would this be the cause of my issue?

    Failed to load https://www.bing.com/fd/ls/lsp.aspx: Request header field **** is not allowed by Access-Control-Allow-Headers in preflight response.

    Also there is this issue which I don't know how related it is:

    Failed to load https://t0.ssl.ak.dynamic.tiles.virtualearth.net/comp/**** Request header field **** is not allowed by Access-Control-Allow-Headers in preflight response.

    I'm not sure how to fix these, any direction would be greatly beneficial.

    Thanks.
    Thursday, February 15, 2018 5:27 PM

Answers

  • It looks like your network/application is blocking access to parts of the Bing Maps API is most likely causing your issues. Given the error, try adding the following to the head section of your webpage:

    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline' https://*.bing.com https://*.virtualearth.net; style-src 'self' 'unsafe-inline' https://*.bing.com https://*.virtualearth.net; media-src *">
    

    This is some documentation about this here: https://msdn.microsoft.com/en-US/library/mt793328.aspx


    [Blog] [twitter] [LinkedIn]

    Thursday, February 15, 2018 7:41 PM

All replies

  • It looks like your network/application is blocking access to parts of the Bing Maps API is most likely causing your issues. Given the error, try adding the following to the head section of your webpage:

    <meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval' 'unsafe-inline' https://*.bing.com https://*.virtualearth.net; style-src 'self' 'unsafe-inline' https://*.bing.com https://*.virtualearth.net; media-src *">
    

    This is some documentation about this here: https://msdn.microsoft.com/en-US/library/mt793328.aspx


    [Blog] [twitter] [LinkedIn]

    Thursday, February 15, 2018 7:41 PM
  • Thanks. I had suspected so, but I'm new to this code and needed justification to change a security policy.
    Friday, February 16, 2018 2:09 PM