How to use the esri-leaflet.MapService.extend 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 / Providers / MapService.js View on Github external
import { Util, geoJson, latLngBounds as LlatLngBounds } from 'leaflet';
import { MapService } from 'esri-leaflet';

export var MapServiceProvider = MapService.extend({
  options: {
    layers: [0],
    label: 'Map Service',
    bufferRadius: 1000,
    maxResults: 5,
    formatSuggestion: function (feature) {
      return feature.properties[feature.displayFieldName] + ' <small>' + feature.layerName + '</small>';
    }
  },

  initialize: function (options) {
    MapService.prototype.initialize.call(this, options);
    this._getIdFields();
  },

  suggestions: function (text, bounds, callback) {