Forum Discussion
Power bi custom visual and leaflet library
- 8 years ago
- 8 years ago
You might workaround this error by including these lines into a new file and including this file into externalJS property of pbiviz.json (please note that this file should be specified before leaflet):
window.devicePixelRatio = Object.defineProperty(window, "devicePixelRatio", { get: function() { return window.window.devicePixelRatio; }, enumerable: true, }); window.outerWidth = Object.defineProperty(window, "outerWidth", { get: function() { return window.window.outerWidth; } }); window.outerHeight = Object.defineProperty(window, "outerHeight", { get: function() { return window.window.outerHeight; } });Please let us know if you have any extra questions.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Thank you so much for your help, I have a quetion when the project was comiled on OS operating syetem the map was rendered succssfully but when i used the windows i have this error
Uncaught TypeError: Illegal invocation at <anonymous>:526:25347 at $t (<anonymous>:526:140) at Window.<anonymous> (<anonymous>:526:150) at <anonymous>:842:20 at Object.r [as injectJsCode] (VM1610 visualhostcore.min.js:2) at i.loadWithoutResourcePackage (VM1611 visualsandbox.min.js:1) at i.executeMessage (VM1611 visualsandbox.min.js:1) at i.onMessageReceived (VM1611 visualsandbox.min.js:1) at VM1611 visualsandbox.min.js:1 at e.invokeHandler (VM1610 visualhostcore.min.js:2) any advise?
You might workaround this error by including these lines into a new file and including this file into externalJS property of pbiviz.json (please note that this file should be specified before leaflet):
window.devicePixelRatio = Object.defineProperty(window, "devicePixelRatio", {
get: function() {
return window.window.devicePixelRatio;
},
enumerable: true,
});
window.outerWidth = Object.defineProperty(window, "outerWidth", {
get: function() {
return window.window.outerWidth;
}
});
window.outerHeight = Object.defineProperty(window, "outerHeight", {
get: function() {
return window.window.outerHeight;
}
});Please let us know if you have any extra questions.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals