How to use the esri-leaflet.Task.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 / Tasks / ReverseGeocode.js View on Github external
import { latLng } from 'leaflet';
import { Task } from 'esri-leaflet';
import { WorldGeocodingServiceUrl } from '../helper';

export var ReverseGeocode = Task.extend({
  path: 'reverseGeocode',

  params: {
    outSR: 4326,
    returnIntersection: false
  },

  setters: {
    'distance': 'distance',
    'language': 'langCode',
    'intersection': 'returnIntersection'
  },

  initialize: function (options) {
    options = options || {};
    options.url = options.url || WorldGeocodingServiceUrl;
github Esri / esri-leaflet-geocoder / src / Tasks / Suggest.js View on Github external
import {
  latLng,
  latLngBounds
} from 'leaflet';
import { Task, Util as EsriUtil } from 'esri-leaflet';
import { WorldGeocodingServiceUrl } from '../helper';

export var Suggest = Task.extend({
  path: 'suggest',

  params: {},

  setters: {
    text: 'text',
    category: 'category',
    countries: 'countryCode',
    maxSuggestions: 'maxSuggestions'
  },

  initialize: function (options) {
    options = options || {};
    if (!options.url) {
      options.url = WorldGeocodingServiceUrl;
      options.supportsSuggest = true;
github Esri / esri-leaflet-geocoder / src / Tasks / Geocode.js View on Github external
import {
  latLng,
  latLngBounds
} from 'leaflet';
import { Task, Util as EsriUtil } from 'esri-leaflet';
import { WorldGeocodingServiceUrl } from '../helper';

export var Geocode = Task.extend({
  path: 'findAddressCandidates',

  params: {
    outSr: 4326,
    forStorage: false,
    outFields: '*',
    maxLocations: 20
  },

  setters: {
    'address': 'address',
    'neighborhood': 'neighborhood',
    'city': 'city',
    'subregion': 'subregion',
    'region': 'region',
    'postal': 'postal',