Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
26 | |
3 | |
2 | |
2 | |
2 |