leafmap
leafmap copied to clipboard
Leafmap save image to static image (JPG or PNG) not working.
Environment Information
- leafmap version: 0.3.0
- Python version: 3.8.7
- Operating System: MacOS Big Sur Version 11.2.3, jupyter-notebook : 6.3.0
Description
I'm trying to save the image as JPG or PNG but when I use the method m.to_image() it ends up taking a screenshot of my Desktop Background image.
What I Did
from leafmap import leafmap
m = leafmap.Map()
m # map got rendered
m.to_image(outfile='./map.png') # run this command on another cell
Yes, it is essentially a screenshot. You need to use the fullscreen mode and then click the toolbar icon to save the image. Update the package using leafmap.update_package() and try it out. You will need two screens if you want to use the to_image() function directly, i.e., fullscreen map on one screen, and run the code on another screen.
