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
564 stars 221 forks source link

Limit autocomplete results to a Bounding Box #319

Closed rzagha1 closed 3 years ago

rzagha1 commented 3 years ago

Using the Mapbox control with this geocoder is there a way to limit the autocomplete results to a BB?

I was looking into the source code

  var Mapbox = /*#__PURE__*/function () {
    function Mapbox(options) {
      this.options = {
        serviceUrl: 'https://api.mapbox.com/geocoding/v5/mapbox.places/'
      };
      L.Util.setOptions(this, options);
    }

I'm just wondering if another options can be included for a BB or edit the serviceUrl for Mapbox