March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Dear all,
I'm converting my visual to the API v.1.2.0 and was happy to see "externalJS" files are now supported.
I've implemented this and I see the code of these third party files when debugging.
The strange thing is, jQuery ($) does work in my visual, however Leaflet (L) is undefined from within my code, but actually is declared (lib initialization code is invoked). Somehow PowerBI seems to clear these globals.
How do I solve this?
With kind regards
Based on my test, you could add the library by using tsconfig.json file. See https://github.com/Microsoft/PowerBI-visuals/blob/master/Tutorial/ExternalLibraries.md.
I was able to use the library using window.L (and not just L)
This is strange because outside Power BI it is without the window prefix, just like the $ for jQuery
How do you implement the constructor method?
I'm not sure I understand your question.
When adding the external libs to the tsconfig, the code is initialized just before mine and are accessible through the window object
Where do you use Leaflet? Could you please post the related code snippet here, as well as some screenshots?
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
7 | |
3 | |
2 | |
1 | |
1 |
User | Count |
---|---|
8 | |
3 | |
2 | |
2 | |
2 |