Leaflet Control Geocoder don't work in mobile device

47 Views Asked by At

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 does not expand, only when I press “Enter” and 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 does not expand, only when I press “Enter” and 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!. 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!

0

There are 0 best solutions below