(
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,
)
| 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 | """ |
nothing calls this directly
no test coverage detected