smeijer / leaflet-geosearch

A geocoding/address-lookup library supporting various api providers.
https://smeijer.github.io/leaflet-geosearch/
MIT License
1.03k stars 273 forks source link

style option "bar" will be ignored #243

Closed ebastuart closed 3 years ago

ebastuart commented 3 years ago

Hello, I have upgraded from 2.7.0 to the latest version. After the upgrade my search bar disappeared. Instead of the search bar I just got just a small empty square close to the zoom buttons. It looks very similar to what I get when I set the style option to "button", but without that somethings happens when I click on it.

image

these settings works for me when I am using 2.7.0.

const searchControl = new GeoSearchControl({
      provider,
      showMarker: false,
      searchLabel: 'Search for an address',
      style: 'bar',
      autoClose: true,
      keepResult: true,
    });

    this._map.addControl(searchControl);

Anybody a clue what I am doing wrong or is it a bug?

smeijer commented 3 years ago

Seems to be working in the docs. https://smeijer.github.io/leaflet-geosearch/leaflet-control#style

Did you include the correct (new) stylesheet? https://unpkg.com/leaflet-geosearch/dist/geosearch.css

ebastuart commented 3 years ago

@smeijer Yes you are right, that was the issue. I had an old stylesheet included. Thanks for help!