forcing suggestions using geocoder to display above search bar
Hello,
I am using the geocoder in the bottom right postion. Suggestions are displaying below the search bar outside of the visual area when I access my page from a phone. How can I force using css the search suggestions to show above the search bar.
Thanks,
Stuart
Would likewise appreciate some insight on how to set the results to display above the map.
For now the only option seems to be overriding the CSS.
.suggestions {
top: auto !important;
bottom: 100% !important;
}
It seems that these CSS adjustments are applied automatically when adding the geocoder to a map if using the lower-left or lower-right locations... but isn't applied when adding to a div (since no context on location is available).
Would be nice to have an option available (in the options object) to force an upwards display.
This worked for me :
in CSS
.geocoder { position: absolute; z-index: 20; right: 10%; top: 14%; text-decoration: none; list-style-type: none; }
In body script ... var geocoder = new MapboxGeocoder({
accessToken: mapboxgl.accessToken, mapboxgl: mapboxgl });
document.getElementById('geocoder').appendChild(geocoder.onAdd(map));
I'd be happy to help review a PR which fixes this.