diff --git a/docs/notebooks/92_maplibre.ipynb b/docs/notebooks/92_maplibre.ipynb index 61218281fa..31a3a88725 100644 --- a/docs/notebooks/92_maplibre.ipynb +++ b/docs/notebooks/92_maplibre.ipynb @@ -812,16 +812,19 @@ " pitch=40,\n", " bearing=-27,\n", ")\n", - "data = create_h3_grid()\n", - "m.add_geojson(\n", - " data,\n", - " layer_type=\"fill-extrusion\",\n", - " paint={\n", - " \"fill-extrusion-color\": [\"get\", \"color\"],\n", - " \"fill-extrusion-opacity\": 0.7,\n", - " \"fill-extrusion-height\": [\"*\", 100, [\"get\", \"count\"]],\n", - " },\n", - ")\n", + "try:\n", + " data = create_h3_grid()\n", + " m.add_geojson(\n", + " data,\n", + " layer_type=\"fill-extrusion\",\n", + " paint={\n", + " \"fill-extrusion-color\": [\"get\", \"color\"],\n", + " \"fill-extrusion-opacity\": 0.7,\n", + " \"fill-extrusion-height\": [\"*\", 100, [\"get\", \"count\"]],\n", + " },\n", + " )\n", + "except:\n", + " pass\n", "m" ] }, @@ -986,7 +989,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.9" + "version": "3.12.2" } }, "nbformat": 4, diff --git a/leafmap/common.py b/leafmap/common.py index 61203242ab..147c0b901b 100644 --- a/leafmap/common.py +++ b/leafmap/common.py @@ -9482,7 +9482,7 @@ def draw_tile( gtiff.SetGeoTransform((min(xp0, xp1), pwidth, 0, max(yp0, yp1), 0, -pheight)) gtiff.SetProjection(WKT_3857) for band in range(imgbands): - array = numpy.array(img.getdata(band), dtype="u8") + array = np.array(img.getdata(band), dtype="u8") array = array.reshape((img.size[1], img.size[0])) band = gtiff.GetRasterBand(band + 1) band.WriteArray(array)