From eb7655bacb2f976095887e616c034de73ddfcc8e Mon Sep 17 00:00:00 2001 From: Camden Date: Thu, 9 Jan 2025 09:54:06 -0500 Subject: [PATCH] hide empty map control container with CSS (#314) --- packages/geospatial/src/components/GeocodingControl.css | 3 +++ packages/geospatial/src/components/GeocodingControl.js | 1 + 2 files changed, 4 insertions(+) create mode 100644 packages/geospatial/src/components/GeocodingControl.css diff --git a/packages/geospatial/src/components/GeocodingControl.css b/packages/geospatial/src/components/GeocodingControl.css new file mode 100644 index 00000000..7b2cb7d0 --- /dev/null +++ b/packages/geospatial/src/components/GeocodingControl.css @@ -0,0 +1,3 @@ +.maplibregl-ctrl-top-left .maplibregl-ctrl:empty { + margin: 0; +} diff --git a/packages/geospatial/src/components/GeocodingControl.js b/packages/geospatial/src/components/GeocodingControl.js index a32943df..50dbaa40 100644 --- a/packages/geospatial/src/components/GeocodingControl.js +++ b/packages/geospatial/src/components/GeocodingControl.js @@ -4,6 +4,7 @@ import { GeocodingControl as MapTilerGeocoding } from '@maptiler/geocoding-contr import maplibregl from 'maplibre-gl'; import { forwardRef, useImperativeHandle } from 'react'; import { useControl, type ControlPosition } from 'react-map-gl'; +import './GeocodingControl.css'; type Props = { apiKey: string,