How to use the esri-leaflet.Util.boundsToExtent function in esri-leaflet

To help you get started, we’ve selected a few esri-leaflet examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Esri / esri-leaflet-geocoder / src / Tasks / Suggest.js View on Github external
within: function (bounds) {
    bounds = latLngBounds(bounds);
    bounds = bounds.pad(0.5);
    var center = bounds.getCenter();
    var ne = bounds.getNorthWest();
    this.params.location = center.lng + ',' + center.lat;
    this.params.distance = Math.min(Math.max(center.distanceTo(ne), 2000), 50000);
    this.params.searchExtent = EsriUtil.boundsToExtent(bounds);
    return this;
  },
github Esri / esri-leaflet-geocoder / src / Tasks / Geocode.js View on Github external
within: function (bounds) {
    bounds = latLngBounds(bounds);
    this.params.searchExtent = EsriUtil.boundsToExtent(bounds);
    return this;
  },