You need to sign in to do that
Don't have an account?
Bryant Daniels 46
leaflet map not showing in lightning component record page
Was wondering if anyone is have a problem displaying the map from leaflet onto a lighting component record page. Following the Accounts near me trailhead. In the trailhead you can see the map in the App which is fine. But i am not able to show it in a lighting component.
Try to clear your browser cache and cookies and then try again.
Best Regards,
Sandhya
Thanks for the response that wasn't the case.
1. you've added leaflet.css and leaflet.js as static resource and have them loaded in your markup. Call you controller function after they are loaded e.g. "afterScriptsLoaded="{!c.createMap}"/>"
2. you have a div in your markup with an id such as "mapid" or "map"
3. when you create your map in the controller you set the map to be in the div you added to the markup e.g. "var map = new L.map('mapid', {"
4. you wanna make sure that you hve a tile layer added as specified in the code section of the trail
This should give you a good idea how to get started too: http://leafletjs.com/examples/quick-start/
Were you able to fix the issue. I am also facing the same issue. Map is getting populated in my developer org. But it is showing blank in my sandbox. Can you please tell me the trick that worked for you?