From 606f79d4833cb95f027de4f10823dfb681f5f451 Mon Sep 17 00:00:00 2001 From: James Scott-Brown Date: Mon, 15 May 2023 15:17:00 +0100 Subject: [PATCH] Remove max-width for tooltips The Maplibre docs say that `options.maxWidth` is "A string that sets the CSS property of the popup's maximum width, eg '300px' . To ensure the popup resizes to fit its content, set this property to 'none'" https://maplibre.org/maplibre-gl-js-docs/api/markers/#popup --- app/src/MaplibreMap.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/MaplibreMap.tsx b/app/src/MaplibreMap.tsx index 33eda26..32f3018 100644 --- a/app/src/MaplibreMap.tsx +++ b/app/src/MaplibreMap.tsx @@ -381,6 +381,7 @@ function MaplibreMap(props: { file: PMTiles }) { const popup = new maplibregl.Popup({ closeButton: false, closeOnClick: false, + maxWidth: 'none', }); mapRef.current = map;