Skip to content

Commit 74afbd6

Browse files
committed
Refactor
1 parent a3ed380 commit 74afbd6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

examples/standalone/ol_express_geotiff.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44

55
m = ox.GeoTIFFTileLayer(url=url, opacity=0.7).to_map()
66
print(m.options)
7+
print(m.calls)
78
m.save()

src/openlayers/express.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
class GeoTIFFTileLayer(LayerLike):
1212
"""Initialize a new `GeoTIFFTileLayer` instance"""
1313

14-
def __init__(self, url: str, opacity: float = 0.5, webgl: bool = True):
15-
tile_layer_callable = WebGLTileLayer if webgl else TileLayer
14+
def __init__(self, url: str, opacity: float = 0.5):
1615
source = GeoTIFFSource(sources=[dict(url=url)])
17-
self._model = tile_layer_callable(opacity=opacity, source=source)
16+
self._model = WebGLTileLayer(opacity=opacity, source=source)
1817

1918
@property
20-
def model(self) -> WebGLTileLayer | TileLayer:
19+
def model(self) -> WebGLTileLayer:
2120
return self._model
2221

2322
def to_map(self, *args, **kwargs) -> Map:

0 commit comments

Comments
 (0)