leafmap icon indicating copy to clipboard operation
leafmap copied to clipboard

Leafmap save image to static image (JPG or PNG) not working.

Open zakhusayn opened this issue 5 years ago • 1 comments

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

zakhusayn avatar Jun 14 '21 12:06 zakhusayn

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.

image

giswqs avatar Jun 14 '21 16:06 giswqs