Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import { Service } from 'esri-leaflet';
import { WorldGeocodingServiceUrl } from '../helper';
import geocode from '../Tasks/Geocode';
import reverseGeocode from '../Tasks/ReverseGeocode';
import suggest from '../Tasks/Suggest';
export var GeocodeService = Service.extend({
initialize: function (options) {
options = options || {};
if (options.url) {
Service.prototype.initialize.call(this, options);
this._confirmSuggestSupport();
} else {
options.url = WorldGeocodingServiceUrl;
options.supportsSuggest = true;
Service.prototype.initialize.call(this, options);
}
},
geocode: function () {
return geocode(this);
},