geemap/geemap.py
def add_tile_layer(
        self,
        url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
        name="Untitled",
        attribution="",
        opacity=1.0,
        shown=True,
        **kwargs,
    ):
        """Adds a TileLayer to the map.

        Args:
            url (str, optional): The URL of the tile layer. Defaults to 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'.
            name (str, optional): The layer name to use for the layer. Defaults to 'Untitled'.
            attribution (str, optional): The attribution to use. Defaults to ''.
            opacity (float, optional): The opacity of the layer. Defaults to 1.
            shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
        """
        try:
            tile_layer = ipyleaflet.TileLayer(
                url=url,
                name=name,
                attribution=attribution,
                opacity=opacity,
                visible=shown,
                **kwargs,
            )
            self.add_layer(tile_layer)

        except Exception as e:
            print("Failed to add the specified TileLayer.")
            raise Exception(e)
Adds a TileLayer to the map.

        Args:
            url (str, optional): The URL of the tile layer. Defaults to 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'.
            name (str, optional): The layer name to use for the layer. Defaults to 'Untitled'.
            attribution (str, optional): The attribution to use. Defaults to ''.
            opacity (float, optional): The opacity of the layer. Defaults to 1.
            shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
        
Adds a TileLayer to the map.
Adds a TileLayer to the map .
def add_tile_layer(
        self,
        url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
        name="Untitled",
        attribution="",
        opacity=1.0,
        shown=True,
        **kwargs,
    ):
        try:
            tile_layer = ipyleaflet.TileLayer(
                url=url,
                name=name,
                attribution=attribution,
                opacity=opacity,
                visible=shown,
                **kwargs,
            )
            self.add_layer(tile_layer)
        except Exception as e:
            print("Failed to add the specified TileLayer.")
            raise Exception(e)
def add_tile_layer ( self , url = "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" , name = "Untitled" , attribution = "" , opacity = 1.0 , shown = True , ** kwargs , ) : try : tile_layer = ipyleaflet . TileLayer ( url = url , name = name , attribution = attribution , opacity = opacity , visible = shown , ** kwargs , ) self . add_layer ( tile_layer ) except Exception as e : print ( "Failed to add the specified TileLayer." ) raise Exception ( e )
Adds a TileLayer to the map.
Adds a TileLayer to the map .
"""Adds a TileLayer to the map.

        Args:
            url (str, optional): The URL of the tile layer. Defaults to 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'.
            name (str, optional): The layer name to use for the layer. Defaults to 'Untitled'.
            attribution (str, optional): The attribution to use. Defaults to ''.
            opacity (float, optional): The opacity of the layer. Defaults to 1.
            shown (bool, optional): A flag indicating whether the layer should be on by default. Defaults to True.
        """
self
url
The URL of the tile layer. Defaults to 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'.
The URL of the tile layer . Defaults to ' https : // { s } . tile . openstreetmap . org / { z } / { x } / { y } . png ' .
'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
name
The layer name to use for the layer. Defaults to 'Untitled'.
The layer name to use for the layer . Defaults to ' Untitled ' .
'Untitled'
attribution
The attribution to use. Defaults to ''.
The attribution to use . Defaults to ' ' .
''
opacity
The opacity of the layer. Defaults to 1.
The opacity of the layer . Defaults to 1 .
1
shown
A flag indicating whether the layer should be on by default. Defaults to True.
A flag indicating whether the layer should be on by default . Defaults to True .
True