MCPcopy
hub / github.com/python-visualization/folium / __init__

Method __init__

folium/raster_layers.py:316–340  ·  view source on GitHub ↗
(
        self,
        image: Any,
        bounds: TypeBounds,
        origin: str = "upper",
        colormap: Optional[Callable] = None,
        mercator_project: bool = False,
        pixelated: bool = True,
        name: Optional[str] = None,
        overlay: bool = True,
        control: bool = True,
        show: bool = True,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

314 )
315
316 def __init__(
317 self,
318 image: Any,
319 bounds: TypeBounds,
320 origin: str = "upper",
321 colormap: Optional[Callable] = None,
322 mercator_project: bool = False,
323 pixelated: bool = True,
324 name: Optional[str] = None,
325 overlay: bool = True,
326 control: bool = True,
327 show: bool = True,
328 **kwargs,
329 ):
330 super().__init__(name=name, overlay=overlay, control=control, show=show)
331 self._name = "ImageOverlay"
332 self.bounds = bounds
333 self.options = remove_empty(**kwargs)
334 self.pixelated = pixelated
335 if mercator_project:
336 image = mercator_transform(
337 image, (bounds[0][0], bounds[1][0]), origin=origin
338 )
339
340 self.url = image_to_url(image, origin=origin, colormap=colormap)
341
342 def _get_self_bounds(self) -> TypeBoundsReturn:
343 """

Callers

nothing calls this directly

Calls 4

remove_emptyFunction · 0.90
mercator_transformFunction · 0.90
image_to_urlFunction · 0.90
__init__Method · 0.45

Tested by

no test coverage detected