perliedman / leaflet-control-geocoder

A simple geocoder form to locate places. Easily extended to multiple data providers.
http://www.liedman.net/leaflet-control-geocoder/
BSD 2-Clause "Simplified" License
560 stars 220 forks source link

Don't work in mobile #344

Open elsasantos opened 10 months ago

elsasantos commented 10 months ago

Hi, I implemented this plugin with this options in my ionic project:

import Geocoder from 'leaflet-control-geocoder';

let providerNomitatim = new Geocoder.nominatim({
  geocodingQueryParams: {
    viewbox: this._box,
    bounded: '1'
  }
});

this.geoControl = new Geocoder({
  geocoder: providerNomitatim,
  showUniqueResult: false,
  showResultIcons: false,
  collapsed: false,
  expand: 'hover',
  query: '',
  queryMinLength: 1,
  suggestMinLength: 3,
  suggestTimeout: 250,
  position: 'topleft',
  placeholder: this._labelPlaceholder,
});

When I write in the input area it doesn't show suggestions, only when I press “Enter” but in the mobile the "Enter" key does nothing. What am I doing wrong?

In the documentation it says the option suggestMinLength is the "Minimum number characters before suggest functionality is used (if available from geocoder)". What does this mean (if available from geocoder)? How can apply this?

Thank you!