geemap/geemap.py
def to_image(self, outfile=None, monitor=1):
        """Saves the map as a PNG or JPG image.

        Args:
            outfile (str, optional): The output file path to the image. Defaults to None.
            monitor (int, optional): The monitor to take the screenshot. Defaults to 1.
        """
        if outfile is None:
            outfile = os.path.join(os.getcwd(), "my_map.png")

        if outfile.endswith(".png") or outfile.endswith(".jpg"):
            pass
        else:
            print("The output file must be a PNG or JPG image.")
            return

        work_dir = os.path.dirname(outfile)
        if not os.path.exists(work_dir):
            os.makedirs(work_dir)

        screenshot = screen_capture(outfile, monitor)
        self.screenshot = screenshot
Saves the map as a PNG or JPG image.

        Args:
            outfile (str, optional): The output file path to the image. Defaults to None.
            monitor (int, optional): The monitor to take the screenshot. Defaults to 1.
        
Saves the map as a PNG or JPG image.
Saves the map as a PNG or JPG image .
def to_image(self, outfile=None, monitor=1):
        if outfile is None:
            outfile = os.path.join(os.getcwd(), "my_map.png")
        if outfile.endswith(".png") or outfile.endswith(".jpg"):
            pass
        else:
            print("The output file must be a PNG or JPG image.")
            return
        work_dir = os.path.dirname(outfile)
        if not os.path.exists(work_dir):
            os.makedirs(work_dir)
        screenshot = screen_capture(outfile, monitor)
        self.screenshot = screenshot
def to_image ( self , outfile = None , monitor = 1 ) : if outfile is None : outfile = os . path . join ( os . getcwd ( ) , "my_map.png" ) if outfile . endswith ( ".png" ) or outfile . endswith ( ".jpg" ) : pass else : print ( "The output file must be a PNG or JPG image." ) return work_dir = os . path . dirname ( outfile ) if not os . path . exists ( work_dir ) : os . makedirs ( work_dir ) screenshot = screen_capture ( outfile , monitor ) self . screenshot = screenshot
Saves the map as a PNG or JPG image.
Saves the map as a PNG or JPG image .
"""Saves the map as a PNG or JPG image.

        Args:
            outfile (str, optional): The output file path to the image. Defaults to None.
            monitor (int, optional): The monitor to take the screenshot. Defaults to 1.
        """
self
outfile
The output file path to the image. Defaults to None.
The output file path to the image . Defaults to None .
None
monitor
The monitor to take the screenshot. Defaults to 1.
The monitor to take the screenshot . Defaults to 1 .
1