Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I am having issues with displaying leaflet tiles in power bi custom visuals. I mainly followed the example from
https://community.powerbi.com/t5/Developer/Power-BI-Cannot-set-height/td-p/140854
I am able to display the map. However, the map zoom and tiles does not seem to be rendering correctly. I appreciate if somebody could help me figure out what's going on with the map.
Map rendering
Visuals.ts
part of the code.
Solved! Go to Solution.
Please include leaflet's CSS into your custom visual by adding the import to style.less:
@import (less) "node_modules/leaflet/dist/leaflet.css";
Please also note you should specify width and height explicitly for #map div element (you might use 100% size).
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
You may inspect the generated HTML in Web Console.
Are you still facing issues with leaflet?
If so, please share the source code of your custom visual as a zip file for debugging.
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Dear Ignat,
Thank you for your response.
Please find attached source code for your reference.
Best regards,
Punya
Please include leaflet's CSS into your custom visual by adding the import to style.less:
@import (less) "node_modules/leaflet/dist/leaflet.css";
Please also note you should specify width and height explicitly for #map div element (you might use 100% size).
Ignat Vilesov,
Software Engineer
Microsoft Power BI Custom Visuals
Thank you very much. It works.
User | Count |
---|---|
14 | |
4 | |
2 | |
1 | |
1 |
User | Count |
---|---|
20 | |
3 | |
2 | |
2 | |
2 |