I'm using a combination of React/Mapbox (DeckGL more specifically) in a project. I want to include Geocoding for querying addresses.
My current output:
Generated with this code:
<DeckGL {...deckGLProps} ref={deckRef}>
<StaticMap
ref={mapRef}
{...staticMapProps}
/>
<div style={{ border: '5px solid black', top: 500, display: 'inline-block', zIndex: '9999'}}>
<Geocoder
mapRef={mapRef}
onViewportChange={handleGeocoderViewportChange}
mapboxApiAccessToken={process.env.REACT_APP_MAPBOX_TOKEN}
position="top-left"
minLength={1}
trackProximity={true}
countries={"us"}
reverseGeocode={true}
enableEventLogging={false}
/>
</div>
</DeckGL>
My problem: I'm unable to click on the search bar. This is shown by the strange positioning of the search bar within its div
. Is there a way to place the component so that the search bar is clickable? I don't think it's a problem with the Geocoder
component since the code in this example works fine.