geemap/geemap.py
def add_cog_layer(
        self,
        url,
        name="Untitled",
        attribution="",
        opacity=1.0,
        shown=True,
        bands=None,
        titiler_endpoint="https://titiler.xyz",
        **kwargs,
    ):
        """Adds a COG TileLayer to the map.

        Args:
            url (str): The URL of the COG tile layer.
            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.
            bands (list, optional): A list of bands to use for the layer. Defaults to None.
            titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
            **kwargs: Arbitrary keyword arguments, including bidx, expression, nodata, unscale, resampling, rescale, color_formula, colormap, colormap_name, return_mask. See https://developmentseed.org/titiler/endpoints/cog/ and https://cogeotiff.github.io/rio-tiler/colormap/. To select a certain bands, use bidx=[1, 2, 3]
        """
        tile_url = cog_tile(url, bands, titiler_endpoint, **kwargs)
        bounds = cog_bounds(url, titiler_endpoint)
        self.add_tile_layer(tile_url, name, attribution, opacity, shown)
        self.fit_bounds([[bounds[1], bounds[0]], [bounds[3], bounds[2]]])

        if not hasattr(self, "cog_layer_dict"):
            self.cog_layer_dict = {}

        params = {
            "url": url,
            "titizer_endpoint": titiler_endpoint,
            "bounds": bounds,
            "type": "COG",
        }
        self.cog_layer_dict[name] = params
Adds a COG TileLayer to the map.

        Args:
            url (str): The URL of the COG tile layer.
            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.
            bands (list, optional): A list of bands to use for the layer. Defaults to None.
            titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
            **kwargs: Arbitrary keyword arguments, including bidx, expression, nodata, unscale, resampling, rescale, color_formula, colormap, colormap_name, return_mask. See https://developmentseed.org/titiler/endpoints/cog/ and https://cogeotiff.github.io/rio-tiler/colormap/. To select a certain bands, use bidx=[1, 2, 3]
        
Adds a COG TileLayer to the map.
Adds a COG TileLayer to the map .
def add_cog_layer(
        self,
        url,
        name="Untitled",
        attribution="",
        opacity=1.0,
        shown=True,
        bands=None,
        titiler_endpoint="https://titiler.xyz",
        **kwargs,
    ):
        tile_url = cog_tile(url, bands, titiler_endpoint, **kwargs)
        bounds = cog_bounds(url, titiler_endpoint)
        self.add_tile_layer(tile_url, name, attribution, opacity, shown)
        self.fit_bounds([[bounds[1], bounds[0]], [bounds[3], bounds[2]]])
        if not hasattr(self, "cog_layer_dict"):
            self.cog_layer_dict = {}
        params = {
            "url": url,
            "titizer_endpoint": titiler_endpoint,
            "bounds": bounds,
            "type": "COG",
        }
        self.cog_layer_dict[name] = params
def add_cog_layer ( self , url , name = "Untitled" , attribution = "" , opacity = 1.0 , shown = True , bands = None , titiler_endpoint = "https://titiler.xyz" , ** kwargs , ) : tile_url = cog_tile ( url , bands , titiler_endpoint , ** kwargs ) bounds = cog_bounds ( url , titiler_endpoint ) self . add_tile_layer ( tile_url , name , attribution , opacity , shown ) self . fit_bounds ( [ [ bounds [ 1 ] , bounds [ 0 ] ] , [ bounds [ 3 ] , bounds [ 2 ] ] ] ) if not hasattr ( self , "cog_layer_dict" ) : self . cog_layer_dict = { } params = { "url" : url , "titizer_endpoint" : titiler_endpoint , "bounds" : bounds , "type" : "COG" , } self . cog_layer_dict [ name ] = params
Adds a COG TileLayer to the map.
Adds a COG TileLayer to the map .
"""Adds a COG TileLayer to the map.

        Args:
            url (str): The URL of the COG tile layer.
            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.
            bands (list, optional): A list of bands to use for the layer. Defaults to None.
            titiler_endpoint (str, optional): Titiler endpoint. Defaults to "https://titiler.xyz".
            **kwargs: Arbitrary keyword arguments, including bidx, expression, nodata, unscale, resampling, rescale, color_formula, colormap, colormap_name, return_mask. See https://developmentseed.org/titiler/endpoints/cog/ and https://cogeotiff.github.io/rio-tiler/colormap/. To select a certain bands, use bidx=[1, 2, 3]
        """
self
url
The URL of the COG tile layer.
The URL of the COG tile layer .
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
bands
A list of bands to use for the layer. Defaults to None.
A list of bands to use for the layer . Defaults to None .
None
titiler_endpoint
None
"https://titiler.xyz"
**kwargs
Arbitrary keyword arguments, including bidx, expression, nodata, unscale, resampling, rescale, color_formula, colormap, colormap_name, return_mask.
Arbitrary keyword arguments including bidx expression nodata unscale resampling rescale color_formula colormap colormap_name return_mask .