I'm developing a Cordova application in VisualStudio 2015. I'm trying, in one of the pages, to add a BingMaps module to display a special location on a map. Therefore, I reference this in my index.html :
<script type="text/javascript" src="ms-appx:///Bing.Maps.JavaScript//js/veapicore.js"></script>
And in my controler, I use the following command :
Microsoft.Maps.loadModule(
'Microsoft.Maps.Map',
{
callback: function () {/*my code here*/}
}
);
When I launch the application, I have this error :
Refused to load the script 'ms-appx:///Bing.Maps.JavaScript//js/veapicore.js' because it violates the following Content Security Policy directive: "default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'". Note that 'script-src' was not explicitly set, so 'default-src' is used as a fallback.
My Content-Security-Policy is the default line, inserted by Cordova :
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
I tried to change (and to remove) this line without any result.
If it helps, I'm debugging the application in Ripple