From 23479294c53ddc1af03ac32fba208f08cc77dd1a Mon Sep 17 00:00:00 2001 From: jgravois Date: Sun, 6 Nov 2016 15:39:56 -0800 Subject: [PATCH] build 2.2.0 --- dist/esri-leaflet-geocoder-debug.js | 1195 +++++++++++++++++++++++++++ dist/esri-leaflet-geocoder.css | 1 + dist/esri-leaflet-geocoder.js | 5 + dist/esri-leaflet-geocoder.js.map | 1 + dist/img/loading.gif | Bin 0 -> 1276 bytes dist/img/loading@2x.gif | Bin 0 -> 3973 bytes dist/img/search-disabled.png | Bin 0 -> 206 bytes dist/img/search.png | Bin 0 -> 425 bytes dist/img/search@2x-disabled.png | Bin 0 -> 206 bytes dist/img/search@2x.png | Bin 0 -> 772 bytes 10 files changed, 1202 insertions(+) create mode 100644 dist/esri-leaflet-geocoder-debug.js create mode 100644 dist/esri-leaflet-geocoder.css create mode 100644 dist/esri-leaflet-geocoder.js create mode 100644 dist/esri-leaflet-geocoder.js.map create mode 100755 dist/img/loading.gif create mode 100755 dist/img/loading@2x.gif create mode 100644 dist/img/search-disabled.png create mode 100644 dist/img/search.png create mode 100644 dist/img/search@2x-disabled.png create mode 100644 dist/img/search@2x.png diff --git a/dist/esri-leaflet-geocoder-debug.js b/dist/esri-leaflet-geocoder-debug.js new file mode 100644 index 0000000..0a14ef9 --- /dev/null +++ b/dist/esri-leaflet-geocoder-debug.js @@ -0,0 +1,1195 @@ +/* esri-leaflet-geocoder - v2.2.0 - Sun Nov 06 2016 15:39:39 GMT-0800 (PST) + * Copyright (c) 2016 Environmental Systems Research Institute, Inc. + * Apache-2.0 */ +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('leaflet'), require('esri-leaflet')) : + typeof define === 'function' && define.amd ? define(['exports', 'leaflet', 'esri-leaflet'], factory) : + (factory((global.L = global.L || {}, global.L.esri = global.L.esri || {}, global.L.esri.Geocoding = global.L.esri.Geocoding || {}),global.L,global.L.esri)); +}(this, function (exports,L,esriLeaflet) { 'use strict'; + + L = 'default' in L ? L['default'] : L; + + var version = "2.2.0"; + + var Geocode = esriLeaflet.Task.extend({ + path: 'find', + + params: { + outSr: 4326, + forStorage: false, + outFields: '*', + maxLocations: 20 + }, + + setters: { + 'address': 'address', + 'neighborhood': 'neighborhood', + 'city': 'city', + 'subregion': 'subregion', + 'region': 'region', + 'postal': 'postal', + 'country': 'country', + 'text': 'text', + 'category': 'category', + 'token': 'token', + 'key': 'magicKey', + 'fields': 'outFields', + 'forStorage': 'forStorage', + 'maxLocations': 'maxLocations' + }, + + initialize: function (options) { + options = options || {}; + options.url = options.url || WorldGeocodingServiceUrl; + esriLeaflet.Task.prototype.initialize.call(this, options); + }, + + within: function (bounds) { + bounds = L.latLngBounds(bounds); + this.params.bbox = esriLeaflet.Util.boundsToExtent(bounds); + return this; + }, + + nearby: function (latlng, radius) { + latlng = L.latLng(latlng); + this.params.location = latlng.lng + ',' + latlng.lat; + this.params.distance = Math.min(Math.max(radius, 2000), 50000); + return this; + }, + + run: function (callback, context) { + if (this.options.customParam) { + this.path = 'findAddressCandidates'; + this.params[this.options.customParam] = this.params.text; + delete this.params.text; + } else { + this.path = (this.params.text) ? 'find' : 'findAddressCandidates'; + } + + if (this.path === 'findAddressCandidates' && this.params.bbox) { + this.params.searchExtent = this.params.bbox; + delete this.params.bbox; + } + + return this.request(function (error, response) { + var processor = (this.path === 'find') ? this._processFindResponse : this._processFindAddressCandidatesResponse; + var results = (!error) ? processor(response) : undefined; + callback.call(context, error, { results: results }, response); + }, this); + }, + + _processFindResponse: function (response) { + var results = []; + + for (var i = 0; i < response.locations.length; i++) { + var location = response.locations[i]; + var bounds; + + if (location.extent) { + bounds = esriLeaflet.Util.extentToBounds(location.extent); + } + + results.push({ + text: location.name, + bounds: bounds, + score: location.feature.attributes.Score, + latlng: L.latLng(location.feature.geometry.y, location.feature.geometry.x), + properties: location.feature.attributes + }); + } + + return results; + }, + + _processFindAddressCandidatesResponse: function (response) { + var results = []; + + for (var i = 0; i < response.candidates.length; i++) { + var candidate = response.candidates[i]; + if (candidate.extent) { + var bounds = esriLeaflet.Util.extentToBounds(candidate.extent); + } + + results.push({ + text: candidate.address, + bounds: bounds, + score: candidate.score, + latlng: L.latLng(candidate.location.y, candidate.location.x), + properties: candidate.attributes + }); + } + + return results; + } + + }); + + function geocode (options) { + return new Geocode(options); + } + + var ReverseGeocode = esriLeaflet.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; + esriLeaflet.Task.prototype.initialize.call(this, options); + }, + + latlng: function (latlng) { + latlng = L.latLng(latlng); + this.params.location = latlng.lng + ',' + latlng.lat; + return this; + }, + + run: function (callback, context) { + return this.request(function (error, response) { + var result; + + if (!error) { + result = { + latlng: L.latLng(response.location.y, response.location.x), + address: response.address + }; + } else { + result = undefined; + } + + callback.call(context, error, result, response); + }, this); + } + }); + + function reverseGeocode (options) { + return new ReverseGeocode(options); + } + + var Suggest = esriLeaflet.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; + } + esriLeaflet.Task.prototype.initialize.call(this, options); + }, + + within: function (bounds) { + bounds = L.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 = esriLeaflet.Util.boundsToExtent(bounds); + return this; + }, + + nearby: function (latlng, radius) { + latlng = L.latLng(latlng); + this.params.location = latlng.lng + ',' + latlng.lat; + this.params.distance = Math.min(Math.max(radius, 2000), 50000); + return this; + }, + + run: function (callback, context) { + if (this.options.supportsSuggest) { + return this.request(function (error, response) { + callback.call(context, error, response, response); + }, this); + } else { + console.warn('this geocoding service does not support asking for suggestions'); + } + } + + }); + + function suggest (options) { + return new Suggest(options); + } + + var GeocodeService = esriLeaflet.Service.extend({ + initialize: function (options) { + options = options || {}; + if (options.url) { + esriLeaflet.Service.prototype.initialize.call(this, options); + this._confirmSuggestSupport(); + } else { + options.url = WorldGeocodingServiceUrl; + options.supportsSuggest = true; + esriLeaflet.Service.prototype.initialize.call(this, options); + } + }, + + geocode: function () { + return geocode(this); + }, + + reverse: function () { + return reverseGeocode(this); + }, + + suggest: function () { + // requires either the Esri World Geocoding Service or a <10.3 ArcGIS Server Geocoding Service that supports suggest. + return suggest(this); + }, + + _confirmSuggestSupport: function () { + this.metadata(function (error, response) { + if (error) { return; } + // pre 10.3 geocoding services dont list capabilities (and dont support maxLocations) + // since, only SOME individual services have been configured to support asking for suggestions + if (!response.capabilities) { + this.options.supportsSuggest = false; + this.options.customParam = response.singleLineAddressField.name; + } else if (response.capabilities.indexOf('Suggest') > -1) { + this.options.supportsSuggest = true; + } else { + this.options.supportsSuggest = false; + } + }, this); + } + }); + + function geocodeService (options) { + return new GeocodeService(options); + } + + var GeosearchCore = L.Evented.extend({ + + options: { + zoomToResult: true, + useMapBounds: 12, + searchBounds: null + }, + + initialize: function (control, options) { + L.Util.setOptions(this, options); + this._control = control; + + if (!options || !options.providers || !options.providers.length) { + throw new Error('You must specify at least one provider'); + } + + this._providers = options.providers; + }, + + _geocode: function (text, key, provider) { + var activeRequests = 0; + var allResults = []; + var bounds; + + var callback = L.Util.bind(function (error, results) { + activeRequests--; + if (error) { + return; + } + + if (results) { + allResults = allResults.concat(results); + } + + if (activeRequests <= 0) { + bounds = this._boundsFromResults(allResults); + + this.fire('results', { + results: allResults, + bounds: bounds, + latlng: (bounds) ? bounds.getCenter() : undefined, + text: text + }, true); + + if (this.options.zoomToResult && bounds) { + this._control._map.fitBounds(bounds); + } + + this.fire('load'); + } + }, this); + + if (key) { + activeRequests++; + provider.results(text, key, this._searchBounds(), callback); + } else { + for (var i = 0; i < this._providers.length; i++) { + activeRequests++; + this._providers[i].results(text, key, this._searchBounds(), callback); + } + } + }, + + _suggest: function (text) { + var activeRequests = this._providers.length; + + var createCallback = L.Util.bind(function (text, provider) { + return L.Util.bind(function (error, suggestions) { + if (error) { return; } + + var i; + + activeRequests = activeRequests - 1; + + if (text.length < 2) { + this._suggestions.innerHTML = ''; + this._suggestions.style.display = 'none'; + return; + } + + if (suggestions.length) { + for (i = 0; i < suggestions.length; i++) { + suggestions[i].provider = provider; + } + } else { + // we still need to update the UI + this._control._renderSuggestions(suggestions); + } + + if (provider._lastRender !== text && provider.nodes) { + for (i = 0; i < provider.nodes.length; i++) { + if (provider.nodes[i].parentElement) { + this._control._suggestions.removeChild(provider.nodes[i]); + } + } + + provider.nodes = []; + } + + if (suggestions.length && this._control._input.value === text) { + this._control.clearSuggestions(provider.nodes); + + provider._lastRender = text; + provider.nodes = this._control._renderSuggestions(suggestions); + this._control._nodes = []; + } + }, this); + }, this); + + this._pendingSuggestions = []; + + for (var i = 0; i < this._providers.length; i++) { + var provider = this._providers[i]; + var request = provider.suggestions(text, this._searchBounds(), createCallback(text, provider)); + this._pendingSuggestions.push(request); + } + }, + + _searchBounds: function () { + if (this.options.searchBounds !== null) { + return this.options.searchBounds; + } + + if (this.options.useMapBounds === false) { + return null; + } + + if (this.options.useMapBounds === true) { + return this._control._map.getBounds(); + } + + if (this.options.useMapBounds <= this._control._map.getZoom()) { + return this._control._map.getBounds(); + } + + return null; + }, + + _boundsFromResults: function (results) { + if (!results.length) { + return; + } + + var nullIsland = L.latLngBounds([0, 0], [0, 0]); + var resultBounds = []; + var resultLatlngs = []; + + // collect the bounds and center of each result + for (var i = results.length - 1; i >= 0; i--) { + var result = results[i]; + + resultLatlngs.push(result.latlng); + + // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present + if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) { + resultBounds.push(result.bounds); + } + } + + // form a bounds object containing all center points + var bounds = L.latLngBounds(resultLatlngs); + + // and extend it to contain all bounds objects + for (var j = 0; j < resultBounds.length; j++) { + bounds.extend(resultBounds[j]); + } + + return bounds; + }, + + _getAttribution: function () { + var attribs = []; + var providers = this._providers; + + for (var i = 0; i < providers.length; i++) { + if (providers[i].options.attribution) { + attribs.push(providers[i].options.attribution); + } + } + + return attribs.join(', '); + } + + }); + + function geosearchCore (control, options) { + return new GeosearchCore(control, options); + } + + var ArcgisOnlineProvider = GeocodeService.extend({ + options: { + label: 'Places and Addresses', + maxResults: 5 + }, + + suggestions: function (text, bounds, callback) { + var request = this.suggest().text(text); + + if (bounds) { + request.within(bounds); + } + + if (this.options.countries) { + request.countries(this.options.countries); + } + + if (this.options.categories) { + request.category(this.options.categories); + } + + // 15 is the maximum number of suggestions that can be returned + request.maxSuggestions(this.options.maxResults); + + return request.run(function (error, results, response) { + var suggestions = []; + if (!error) { + while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) { + var suggestion = response.suggestions.shift(); + if (!suggestion.isCollection) { + suggestions.push({ + text: suggestion.text, + magicKey: suggestion.magicKey + }); + } + } + } + callback(error, suggestions); + }, this); + }, + + results: function (text, key, bounds, callback) { + var request = this.geocode().text(text); + + if (key) { + request.key(key); + } + // in the future Address/StreetName geocoding requests that include a magicKey will only return one match + request.maxLocations(this.options.maxResults); + + if (bounds) { + request.within(bounds); + } + + if (this.options.forStorage) { + request.forStorage(true); + } + + return request.run(function (error, response) { + callback(error, response.results); + }, this); + } + }); + + function arcgisOnlineProvider (options) { + return new ArcgisOnlineProvider(options); + } + + var Geosearch = L.Control.extend({ + includes: L.Mixin.Events, + + options: { + position: 'topleft', + collapseAfterResult: true, + expanded: false, + allowMultipleResults: true, + placeholder: 'Search for places or addresses', + title: 'Location Search' + }, + + initialize: function (options) { + L.Util.setOptions(this, options); + + if (!options || !options.providers || !options.providers.length) { + options = {}; + options.providers = [ arcgisOnlineProvider() ]; + } + + // instantiate the underlying class and pass along options + this._geosearchCore = geosearchCore(this, options); + this._geosearchCore._providers = options.providers; + + // bubble each providers events to the control + this._geosearchCore.addEventParent(this); + for (var i = 0; i < this._geosearchCore._providers.length; i++) { + this._geosearchCore._providers[i].addEventParent(this); + } + + this._geosearchCore._pendingSuggestions = []; + + L.Control.prototype.initialize.call(options); + }, + + _renderSuggestions: function (suggestions) { + var currentGroup; + this._suggestions.style.display = 'block'; + + // set the maxHeight of the suggestions box to + // map height + // - suggestions offset (distance from top of suggestions to top of control) + // - control offset (distance from top of control to top of map) + // - 10 (extra padding) + this._suggestions.style.maxHeight = (this._map.getSize().y - this._suggestions.offsetTop - this._wrapper.offsetTop - 10) + 'px'; + + var nodes = []; + var list; + var header; + + for (var i = 0; i < suggestions.length; i++) { + var suggestion = suggestions[i]; + if (!header && this._geosearchCore._providers.length > 1 && currentGroup !== suggestion.provider.options.label) { + header = L.DomUtil.create('span', 'geocoder-control-header', this._suggestions); + header.textContent = suggestion.provider.options.label; + header.innerText = suggestion.provider.options.label; + currentGroup = suggestion.provider.options.label; + nodes.push(header); + } + + if (!list) { + list = L.DomUtil.create('ul', 'geocoder-control-list', this._suggestions); + } + + var suggestionItem = L.DomUtil.create('li', 'geocoder-control-suggestion', list); + + suggestionItem.innerHTML = suggestion.text; + suggestionItem.provider = suggestion.provider; + suggestionItem['data-magic-key'] = suggestion.magicKey; + } + + L.DomUtil.removeClass(this._input, 'geocoder-control-loading'); + + nodes.push(list); + + return nodes; + }, + + _boundsFromResults: function (results) { + if (!results.length) { + return; + } + + var nullIsland = L.latLngBounds([0, 0], [0, 0]); + var resultBounds = []; + var resultLatlngs = []; + + // collect the bounds and center of each result + for (var i = results.length - 1; i >= 0; i--) { + var result = results[i]; + + resultLatlngs.push(result.latlng); + + // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present + if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) { + resultBounds.push(result.bounds); + } + } + + // form a bounds object containing all center points + var bounds = L.latLngBounds(resultLatlngs); + + // and extend it to contain all bounds objects + for (var j = 0; j < resultBounds.length; j++) { + bounds.extend(resultBounds[j]); + } + + return bounds; + }, + + clear: function () { + this._suggestions.innerHTML = ''; + this._suggestions.style.display = 'none'; + this._input.value = ''; + + if (this.options.collapseAfterResult) { + this._input.placeholder = ''; + L.DomUtil.removeClass(this._wrapper, 'geocoder-control-expanded'); + } + + if (!this._map.scrollWheelZoom.enabled() && this._map.options.scrollWheelZoom) { + this._map.scrollWheelZoom.enable(); + } + }, + + clearSuggestions: function () { + if (this._nodes) { + for (var k = 0; k < this._nodes.length; k++) { + if (this._nodes[k].parentElement) { + this._suggestions.removeChild(this._nodes[k]); + } + } + } + }, + + _setupClick: function () { + L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded'); + this._input.focus(); + }, + + disable: function () { + this._input.disabled = true; + L.DomUtil.addClass(this._input, 'geocoder-control-input-disabled'); + L.DomEvent.removeListener(this._wrapper, 'click', this._setupClick, this); + }, + + enable: function () { + this._input.disabled = false; + L.DomUtil.removeClass(this._input, 'geocoder-control-input-disabled'); + L.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this); + }, + + getAttribution: function () { + var attribs = []; + + for (var i = 0; i < this._providers.length; i++) { + if (this._providers[i].options.attribution) { + attribs.push(this._providers[i].options.attribution); + } + } + + return attribs.join(', '); + }, + + onAdd: function (map) { + // include 'Powered by Esri' in map attribution + esriLeaflet.Util.setEsriAttribution(map); + + this._map = map; + this._wrapper = L.DomUtil.create('div', 'geocoder-control'); + this._input = L.DomUtil.create('input', 'geocoder-control-input leaflet-bar', this._wrapper); + this._input.title = this.options.title; + + if (this.options.expanded) { + L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded'); + this._input.placeholder = this.options.placeholder; + } + + this._suggestions = L.DomUtil.create('div', 'geocoder-control-suggestions leaflet-bar', this._wrapper); + + var credits = this._geosearchCore._getAttribution(); + map.attributionControl.addAttribution(credits); + + L.DomEvent.addListener(this._input, 'focus', function (e) { + this._input.placeholder = this.options.placeholder; + L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded'); + }, this); + + L.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this); + + L.DomEvent.addListener(this._suggestions, 'mousedown', function (e) { + var suggestionItem = e.target || e.srcElement; + this._geosearchCore._geocode(suggestionItem.innerHTML, suggestionItem['data-magic-key'], suggestionItem.provider); + this.clear(); + }, this); + + L.DomEvent.addListener(this._input, 'blur', function (e) { + this.clear(); + }, this); + + L.DomEvent.addListener(this._input, 'keydown', function (e) { + L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded'); + + var list = this._suggestions.querySelectorAll('.' + 'geocoder-control-suggestion'); + var selected = this._suggestions.querySelectorAll('.' + 'geocoder-control-selected')[0]; + var selectedPosition; + + for (var i = 0; i < list.length; i++) { + if (list[i] === selected) { + selectedPosition = i; + break; + } + } + + switch (e.keyCode) { + case 13: + if (selected) { + this._geosearchCore._geocode(selected.innerHTML, selected['data-magic-key'], selected.provider); + this.clear(); + } else if (this.options.allowMultipleResults) { + this._geosearchCore._geocode(this._input.value, undefined); + this.clear(); + } else { + L.DomUtil.addClass(list[0], 'geocoder-control-selected'); + } + L.DomEvent.preventDefault(e); + break; + case 38: + if (selected) { + L.DomUtil.removeClass(selected, 'geocoder-control-selected'); + } + + var previousItem = list[selectedPosition - 1]; + + if (selected && previousItem) { + L.DomUtil.addClass(previousItem, 'geocoder-control-selected'); + } else { + L.DomUtil.addClass(list[list.length - 1], 'geocoder-control-selected'); + } + L.DomEvent.preventDefault(e); + break; + case 40: + if (selected) { + L.DomUtil.removeClass(selected, 'geocoder-control-selected'); + } + + var nextItem = list[selectedPosition + 1]; + + if (selected && nextItem) { + L.DomUtil.addClass(nextItem, 'geocoder-control-selected'); + } else { + L.DomUtil.addClass(list[0], 'geocoder-control-selected'); + } + L.DomEvent.preventDefault(e); + break; + default: + // when the input changes we should cancel all pending suggestion requests if possible to avoid result collisions + for (var x = 0; x < this._geosearchCore._pendingSuggestions.length; x++) { + var request = this._geosearchCore._pendingSuggestions[x]; + if (request && request.abort && !request.id) { + request.abort(); + } + } + break; + } + }, this); + + L.DomEvent.addListener(this._input, 'keyup', L.Util.throttle(function (e) { + var key = e.which || e.keyCode; + var text = (e.target || e.srcElement).value; + + // require at least 2 characters for suggestions + if (text.length < 2) { + this._suggestions.innerHTML = ''; + this._suggestions.style.display = 'none'; + L.DomUtil.removeClass(this._input, 'geocoder-control-loading'); + return; + } + + // if this is the escape key it will clear the input so clear suggestions + if (key === 27) { + this._suggestions.innerHTML = ''; + this._suggestions.style.display = 'none'; + return; + } + + // if this is NOT the up/down arrows or enter make a suggestion + if (key !== 13 && key !== 38 && key !== 40) { + if (this._input.value !== this._lastValue) { + this._lastValue = this._input.value; + L.DomUtil.addClass(this._input, 'geocoder-control-loading'); + this._geosearchCore._suggest(text); + } + } + }, 50, this), this); + + L.DomEvent.disableClickPropagation(this._wrapper); + + // when mouse moves over suggestions disable scroll wheel zoom if its enabled + L.DomEvent.addListener(this._suggestions, 'mouseover', function (e) { + if (map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) { + map.scrollWheelZoom.disable(); + } + }); + + // when mouse moves leaves suggestions enable scroll wheel zoom if its disabled + L.DomEvent.addListener(this._suggestions, 'mouseout', function (e) { + if (!map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) { + map.scrollWheelZoom.enable(); + } + }); + + this._geosearchCore.on('load', function (e) { + L.DomUtil.removeClass(this._input, 'geocoder-control-loading'); + this.clear(); + this._input.blur(); + }, this); + + return this._wrapper; + } + }); + + function geosearch (options) { + return new Geosearch(options); + } + + var FeatureLayerProvider = esriLeaflet.FeatureLayerService.extend({ + options: { + label: 'Feature Layer', + maxResults: 5, + bufferRadius: 1000, + formatSuggestion: function (feature) { + return feature.properties[this.options.searchFields[0]]; + } + }, + + initialize: function (options) { + esriLeaflet.FeatureLayerService.prototype.initialize.call(this, options); + if (typeof this.options.searchFields === 'string') { + this.options.searchFields = [this.options.searchFields]; + } + this._suggestionsQuery = this.query(); + this._resultsQuery = this.query(); + }, + + suggestions: function (text, bounds, callback) { + var query = this._suggestionsQuery.where(this._buildQuery(text)) + .returnGeometry(false); + + if (bounds) { + query.intersects(bounds); + } + + if (this.options.idField) { + query.fields([this.options.idField].concat(this.options.searchFields)); + } + + var request = query.run(function (error, results, raw) { + if (error) { + callback(error, []); + } else { + this.options.idField = raw.objectIdFieldName; + var suggestions = []; + for (var i = results.features.length - 1; i >= 0; i--) { + var feature = results.features[i]; + suggestions.push({ + text: this.options.formatSuggestion.call(this, feature), + magicKey: feature.id + }); + } + callback(error, suggestions.slice(0, this.options.maxResults)); + } + }, this); + + return request; + }, + + results: function (text, key, bounds, callback) { + var query = this._resultsQuery; + + if (key) { + query.featureIds([key]); + } else { + query.where(this._buildQuery(text)); + } + + if (bounds) { + query.within(bounds); + } + + return query.run(L.Util.bind(function (error, features) { + var results = []; + for (var i = 0; i < features.features.length; i++) { + var feature = features.features[i]; + if (feature) { + var bounds = this._featureBounds(feature); + + var result = { + latlng: bounds.getCenter(), + bounds: bounds, + text: this.options.formatSuggestion.call(this, feature), + properties: feature.properties, + geojson: feature + }; + + results.push(result); + } + } + callback(error, results); + }, this)); + }, + + orderBy: function (fieldName, order) { + this._suggestionsQuery.orderBy(fieldName, order); + }, + + _buildQuery: function (text) { + var queryString = []; + + for (var i = this.options.searchFields.length - 1; i >= 0; i--) { + var field = 'upper("' + this.options.searchFields[i] + '")'; + + queryString.push(field + " LIKE upper('%" + text + "%')"); + } + + if (this.options.where) { + return this.options.where + ' AND (' + queryString.join(' OR ') + ')'; + } else { + return queryString.join(' OR '); + } + }, + + _featureBounds: function (feature) { + var geojson = L.geoJson(feature); + if (feature.geometry.type === 'Point') { + var center = geojson.getBounds().getCenter(); + var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat); + var latRadius = (this.options.bufferRadius / 40075017) * 360; + return L.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]); + } else { + return geojson.getBounds(); + } + } + }); + + function featureLayerProvider (options) { + return new FeatureLayerProvider(options); + } + + var MapServiceProvider = esriLeaflet.MapService.extend({ + options: { + layers: [0], + label: 'Map Service', + bufferRadius: 1000, + maxResults: 5, + formatSuggestion: function (feature) { + return feature.properties[feature.displayFieldName] + ' ' + feature.layerName + ''; + } + }, + + initialize: function (options) { + esriLeaflet.MapService.prototype.initialize.call(this, options); + this._getIdFields(); + }, + + suggestions: function (text, bounds, callback) { + var request = this.find().text(text).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers); + + return request.run(function (error, results, raw) { + var suggestions = []; + if (!error) { + var count = Math.min(this.options.maxResults, results.features.length); + raw.results = raw.results.reverse(); + for (var i = 0; i < count; i++) { + var feature = results.features[i]; + var result = raw.results[i]; + var layer = result.layerId; + var idField = this._idFields[layer]; + feature.layerId = layer; + feature.layerName = this._layerNames[layer]; + feature.displayFieldName = this._displayFields[layer]; + if (idField) { + suggestions.push({ + text: this.options.formatSuggestion.call(this, feature), + magicKey: result.attributes[idField] + ':' + layer + }); + } + } + } + callback(error, suggestions.reverse()); + }, this); + }, + + results: function (text, key, bounds, callback) { + var results = []; + var request; + + if (key) { + var featureId = key.split(':')[0]; + var layer = key.split(':')[1]; + request = this.query().layer(layer).featureIds(featureId); + } else { + request = this.find().text(text).fields(this.options.searchFields).layers(this.options.layers); + } + + return request.run(function (error, features, response) { + if (!error) { + if (response.results) { + response.results = response.results.reverse(); + } + for (var i = 0; i < features.features.length; i++) { + var feature = features.features[i]; + layer = layer || response.results[i].layerId; + + if (feature && layer !== undefined) { + var bounds = this._featureBounds(feature); + feature.layerId = layer; + feature.layerName = this._layerNames[layer]; + feature.displayFieldName = this._displayFields[layer]; + + var result = { + latlng: bounds.getCenter(), + bounds: bounds, + text: this.options.formatSuggestion.call(this, feature), + properties: feature.properties, + geojson: feature + }; + + results.push(result); + } + } + } + callback(error, results.reverse()); + }, this); + }, + + _featureBounds: function (feature) { + var geojson = L.geoJson(feature); + if (feature.geometry.type === 'Point') { + var center = geojson.getBounds().getCenter(); + var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat); + var latRadius = (this.options.bufferRadius / 40075017) * 360; + return L.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]); + } else { + return geojson.getBounds(); + } + }, + + _layerMetadataCallback: function (layerid) { + return L.Util.bind(function (error, metadata) { + if (error) { return; } + this._displayFields[layerid] = metadata.displayField; + this._layerNames[layerid] = metadata.name; + for (var i = 0; i < metadata.fields.length; i++) { + var field = metadata.fields[i]; + if (field.type === 'esriFieldTypeOID') { + this._idFields[layerid] = field.name; + break; + } + } + }, this); + }, + + _getIdFields: function () { + this._idFields = {}; + this._displayFields = {}; + this._layerNames = {}; + for (var i = 0; i < this.options.layers.length; i++) { + var layer = this.options.layers[i]; + this.get(layer, {}, this._layerMetadataCallback(layer)); + } + } + }); + + function mapServiceProvider (options) { + return new MapServiceProvider(options); + } + + var GeocodeServiceProvider = GeocodeService.extend({ + options: { + label: 'Geocode Server', + maxResults: 5 + }, + + suggestions: function (text, bounds, callback) { + if (this.options.supportsSuggest) { + var request = this.suggest().text(text); + if (bounds) { + request.within(bounds); + } + + return request.run(function (error, results, response) { + var suggestions = []; + if (!error) { + while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) { + var suggestion = response.suggestions.shift(); + if (!suggestion.isCollection) { + suggestions.push({ + text: suggestion.text, + magicKey: suggestion.magicKey + }); + } + } + } + callback(error, suggestions); + }, this); + } else { + callback(undefined, []); + return false; + } + }, + + results: function (text, key, bounds, callback) { + var request = this.geocode().text(text); + + request.maxLocations(this.options.maxResults); + + if (bounds) { + request.within(bounds); + } + + return request.run(function (error, response) { + callback(error, response.results); + }, this); + } + }); + + function geocodeServiceProvider (options) { + return new GeocodeServiceProvider(options); + } + + var WorldGeocodingServiceUrl = 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/'; + + exports.WorldGeocodingServiceUrl = WorldGeocodingServiceUrl; + exports.VERSION = version; + exports.Geocode = Geocode; + exports.geocode = geocode; + exports.ReverseGeocode = ReverseGeocode; + exports.reverseGeocode = reverseGeocode; + exports.Suggest = Suggest; + exports.suggest = suggest; + exports.GeocodeService = GeocodeService; + exports.geocodeService = geocodeService; + exports.Geosearch = Geosearch; + exports.geosearch = geosearch; + exports.GeosearchCore = GeosearchCore; + exports.geosearchCore = geosearchCore; + exports.ArcgisOnlineProvider = ArcgisOnlineProvider; + exports.arcgisOnlineProvider = arcgisOnlineProvider; + exports.FeatureLayerProvider = FeatureLayerProvider; + exports.featureLayerProvider = featureLayerProvider; + exports.MapServiceProvider = MapServiceProvider; + exports.mapServiceProvider = mapServiceProvider; + exports.GeocodeServiceProvider = GeocodeServiceProvider; + exports.geocodeServiceProvider = geocodeServiceProvider; + +})); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZXNyaS1sZWFmbGV0LWdlb2NvZGVyLWRlYnVnLmpzIiwic291cmNlcyI6WyIuLi9wYWNrYWdlLmpzb24iLCIuLi9zcmMvVGFza3MvR2VvY29kZS5qcyIsIi4uL3NyYy9UYXNrcy9SZXZlcnNlR2VvY29kZS5qcyIsIi4uL3NyYy9UYXNrcy9TdWdnZXN0LmpzIiwiLi4vc3JjL1NlcnZpY2VzL0dlb2NvZGUuanMiLCIuLi9zcmMvQ2xhc3Nlcy9HZW9zZWFyY2hDb3JlLmpzIiwiLi4vc3JjL1Byb3ZpZGVycy9BcmNnaXNPbmxpbmVHZW9jb2Rlci5qcyIsIi4uL3NyYy9Db250cm9scy9HZW9zZWFyY2guanMiLCIuLi9zcmMvUHJvdmlkZXJzL0ZlYXR1cmVMYXllci5qcyIsIi4uL3NyYy9Qcm92aWRlcnMvTWFwU2VydmljZS5qcyIsIi4uL3NyYy9Qcm92aWRlcnMvR2VvY29kZVNlcn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ztBQUNiLENBQUEsR0FBRztBQUNILENBQUEsQ0FBQyxDQUFDLENBQUM7O0FBRUgsQ0FBTyxTQUFTLHNCQUFzQixFQUFFLE9BQU8sRUFBRTtBQUNqRCxDQUFBLEVBQUUsT0FBTyxJQUFJLHNCQUFzQixDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBQzdDLENBQUEsQ0FBQzs7Q0NwRE0sSUFBSSx3QkFBd0IsR0FBRyxzRUFBc0UsQ0FBQzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OzsifQ== \ No newline at end of file diff --git a/dist/esri-leaflet-geocoder.css b/dist/esri-leaflet-geocoder.css new file mode 100644 index 0000000..1298c56 --- /dev/null +++ b/dist/esri-leaflet-geocoder.css @@ -0,0 +1 @@ +.geocoder-control-input{position:absolute;left:0;top:0;background-color:white;background-repeat:no-repeat;background-image:url("img/search.png");background-size:26px;border:none;padding:0;text-indent:6px;font-size:13px;line-height:normal;height:auto;padding-top:5px;padding-bottom:5px;width:100%;background-position:right center;cursor:pointer;box-sizing:border-box}.geocoder-control-input-disabled{background-color:#f4f4f4;background-image:url("img/search-disabled.png")}.geocoder-control{width:26px;height:26px;-webkit-transition:width .175s ease-in;-moz-transition:width .175s ease-in;-ms-transition:width .175s ease-in;-o-transition:width .175s ease-in;transition:width .175s ease-in}.geocoder-control-expanded,.leaflet-touch .geocoder-control-expanded{width:275px}.geocoder-control-input.geocoder-control-loading{background-image:url("img/loading.gif");background-size:26px}@media only screen and (min--moz-device-pixel-ratio: 2), only screen and (-o-min-device-pixel-ratio: 2 / 1), only screen and (-webkit-min-device-pixel-ratio: 2), only screen and (min-device-pixel-ratio: 2){.geocoder-control-input{background-image:url("img/search@2x.png")}.geocoder-control-input-disabled{background-image:url("img/search@2x-disabled.png")}.geocoder-control-input.geocoder-control-loading{background-image:url("img/loading@2x.gif")}}.geocoder-control-input:focus{outline:none;cursor:text}.geocoder-control-input::-ms-clear{display:none}.geocoder-control-suggestions{width:100%;position:absolute;top:26px;left:0;margin-top:10px;overflow:auto;display:none}.geocoder-control-list+.geocoder-control-header{border-top:1px solid #d5d5d5}.geocoder-control-header{font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:0.05em;color:#444;background:#F2F2F2;border-bottom:1px solid #d5d5d5;display:block;padding:.5em}.geocoder-control-list{list-style:none;margin:0;padding:0}.geocoder-control-suggestions .geocoder-control-suggestion{font-size:13px;padding:7px;background:white;border-top:1px solid #f1f1f1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.geocoder-control-suggestions .geocoder-control-suggestion:first-child{border:none}.geocoder-control-suggestions .geocoder-control-suggestion.geocoder-control-selected,.geocoder-control-suggestions .geocoder-control-suggestion:hover{background:#7FDFFF;border-color:#7FDFFF}.leaflet-right .geocoder-control-suggestions{left:auto;right:0}.leaflet-right .geocoder-control-input{left:auto;right:0}.leaflet-touch .geocoder-control{width:30px;height:30px}.leaflet-touch .geocoder-control.geocoder-control-expanded{width:275px}.leaflet-touch .geocoder-control-input{height:30px;line-height:30px;background-size:30px}.leaflet-touch .geocoder-control-suggestions{top:30px}.leaflet-oldie .geocoder-control-input{width:28px;height:28px}.leaflet-oldie .geocoder-control-expanded .geocoder-control-input{width:auto}.leaflet-oldie .geocoder-control-input,.leaflet-oldie .geocoder-control-suggestions{border:1px solid #999} diff --git a/dist/esri-leaflet-geocoder.js b/dist/esri-leaflet-geocoder.js new file mode 100644 index 0000000..9e41dfa --- /dev/null +++ b/dist/esri-leaflet-geocoder.js @@ -0,0 +1,5 @@ +/* esri-leaflet-geocoder - v2.2.0 - Sun Nov 06 2016 15:39:39 GMT-0800 (PST) + * Copyright (c) 2016 Environmental Systems Research Institute, Inc. + * Apache-2.0 */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("leaflet"),require("esri-leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet","esri-leaflet"],t):t((e.L=e.L||{},e.L.esri=e.L.esri||{},e.L.esri.Geocoding=e.L.esri.Geocoding||{}),e.L,e.L.esri)}(this,function(e,t,s){"use strict";function i(e){return new g(e)}function o(e){return new f(e)}function n(e){return new v(e)}function r(e){return new m(e)}function a(e,t){return new _(e,t)}function l(e){return new y(e)}function u(e){return new b(e)}function d(e){return new x(e)}function h(e){return new C(e)}function c(e){return new S(e)}t="default"in t?t.default:t;var p="2.2.0",g=s.Task.extend({path:"find",params:{outSr:4326,forStorage:!1,outFields:"*",maxLocations:20},setters:{address:"address",neighborhood:"neighborhood",city:"city",subregion:"subregion",region:"region",postal:"postal",country:"country",text:"text",category:"category",token:"token",key:"magicKey",fields:"outFields",forStorage:"forStorage",maxLocations:"maxLocations"},initialize:function(e){e=e||{},e.url=e.url||L,s.Task.prototype.initialize.call(this,e)},within:function(e){return e=t.latLngBounds(e),this.params.bbox=s.Util.boundsToExtent(e),this},nearby:function(e,s){return e=t.latLng(e),this.params.location=e.lng+","+e.lat,this.params.distance=Math.min(Math.max(s,2e3),5e4),this},run:function(e,t){return this.options.customParam?(this.path="findAddressCandidates",this.params[this.options.customParam]=this.params.text,delete this.params.text):this.path=this.params.text?"find":"findAddressCandidates","findAddressCandidates"===this.path&&this.params.bbox&&(this.params.searchExtent=this.params.bbox,delete this.params.bbox),this.request(function(s,i){var o="find"===this.path?this._processFindResponse:this._processFindAddressCandidatesResponse,n=s?void 0:o(i);e.call(t,s,{results:n},i)},this)},_processFindResponse:function(e){for(var i=[],o=0;o-1?this.options.supportsSuggest=!0:this.options.supportsSuggest=!1:(this.options.supportsSuggest=!1,this.options.customParam=t.singleLineAddressField.name))},this)}}),_=t.Evented.extend({options:{zoomToResult:!0,useMapBounds:12,searchBounds:null},initialize:function(e,s){if(t.Util.setOptions(this,s),this._control=e,!s||!s.providers||!s.providers.length)throw new Error("You must specify at least one provider");this._providers=s.providers},_geocode:function(e,s,i){var o,n=0,r=[],a=t.Util.bind(function(t,s){n--,t||(s&&(r=r.concat(s)),n<=0&&(o=this._boundsFromResults(r),this.fire("results",{results:r,bounds:o,latlng:o?o.getCenter():void 0,text:e},!0),this.options.zoomToResult&&o&&this._control._map.fitBounds(o),this.fire("load")))},this);if(s)n++,i.results(e,s,this._searchBounds(),a);else for(var l=0;l=0;n--){var r=e[n];o.push(r.latlng),r.bounds&&r.bounds.isValid()&&!r.bounds.equals(s)&&i.push(r.bounds)}for(var a=t.latLngBounds(o),l=0;l1&&s!==a.provider.options.label&&(o=t.DomUtil.create("span","geocoder-control-header",this._suggestions),o.textContent=a.provider.options.label,o.innerText=a.provider.options.label,s=a.provider.options.label,n.push(o)),i||(i=t.DomUtil.create("ul","geocoder-control-list",this._suggestions));var l=t.DomUtil.create("li","geocoder-control-suggestion",i);l.innerHTML=a.text,l.provider=a.provider,l["data-magic-key"]=a.magicKey}return t.DomUtil.removeClass(this._input,"geocoder-control-loading"),n.push(i),n},_boundsFromResults:function(e){if(e.length){for(var s=t.latLngBounds([0,0],[0,0]),i=[],o=[],n=e.length-1;n>=0;n--){var r=e[n];o.push(r.latlng),r.bounds&&r.bounds.isValid()&&!r.bounds.equals(s)&&i.push(r.bounds)}for(var a=t.latLngBounds(o),l=0;l=0;n--){var r=t.features[n];o.push({text:this.options.formatSuggestion.call(this,r),magicKey:r.id})}s(e,o.slice(0,this.options.maxResults))}},this);return o},results:function(e,s,i,o){var n=this._resultsQuery;return s?n.featureIds([s]):n.where(this._buildQuery(e)),i&&n.within(i),n.run(t.Util.bind(function(e,t){for(var s=[],i=0;i=0;s--){var i='upper("'+this.options.searchFields[s]+'")';t.push(i+" LIKE upper('%"+e+"%')")}return this.options.where?this.options.where+" AND ("+t.join(" OR ")+")":t.join(" OR ")},_featureBounds:function(e){var s=t.geoJson(e);if("Point"===e.geometry.type){var i=s.getBounds().getCenter(),o=this.options.bufferRadius/40075017*360/Math.cos(180/Math.PI*i.lat),n=this.options.bufferRadius/40075017*360;return t.latLngBounds([i.lat-n,i.lng-o],[i.lat+n,i.lng+o])}return s.getBounds()}}),C=s.MapService.extend({options:{layers:[0],label:"Map Service",bufferRadius:1e3,maxResults:5,formatSuggestion:function(e){return e.properties[e.displayFieldName]+" "+e.layerName+""}},initialize:function(e){s.MapService.prototype.initialize.call(this,e),this._getIdFields()},suggestions:function(e,t,s){var i=this.find().text(e).fields(this.options.searchFields).returnGeometry(!1).layers(this.options.layers);return i.run(function(e,t,i){var o=[];if(!e){var n=Math.min(this.options.maxResults,t.features.length);i.results=i.results.reverse();for(var r=0;r (http://patrickarlt.com)\",\n \"contributors\": [\n \"Patrick Arlt (http://patrickarlt.com)\",\n \"John Gravois (http://johngravois.com)\"\n ],\n \"dependencies\": {\n \"esri-leaflet\": \"^2.0.3\",\n \"leaflet\": \"^1.0.0\"\n },\n \"devDependencies\": {\n \"chai\": \"2.3.0\",\n \"gh-release\": \"^2.0.0\",\n \"http-server\": \"^0.8.5\",\n \"imagemin\": \"^3.2.0\",\n \"isparta\": \"^3.0.3\",\n \"istanbul\": \"^0.4.2\",\n \"karma\": \"^0.12.24\",\n \"karma-chai-sinon\": \"^0.1.3\",\n \"karma-coverage\": \"^0.5.3\",\n \"karma-mocha\": \"^0.1.0\",\n \"karma-mocha-reporter\": \"^0.2.5\",\n \"karma-phantomjs-launcher\": \"^0.2.0\",\n \"karma-sourcemap-loader\": \"^0.3.5\",\n \"mkdirp\": \"^0.5.1\",\n \"mocha\": \"^2.3.4\",\n \"node-sass\": \"^3.2.0\",\n \"parallelshell\": \"^2.0.0\",\n \"phantomjs\": \"^1.9.17\",\n \"rollup\": \"^0.25.4\",\n \"rollup-plugin-json\": \"^2.0.0\",\n \"rollup-plugin-node-resolve\": \"^1.4.0\",\n \"rollup-plugin-uglify\": \"^0.3.1\",\n \"semistandard\": \"^7.0.5\",\n \"sinon\": \"^1.11.1\",\n \"sinon-chai\": \"2.7.0\",\n \"uglify-js\": \"^2.6.1\",\n \"watch\": \"^0.17.1\"\n },\n \"homepage\": \"https://github.com/Esri/esri-leaflet-geocoder\",\n \"jsnext:main\": \"src/EsriLeafletGeocoding.js\",\n \"jspm\": {\n \"registry\": \"npm\",\n \"format\": \"es6\",\n \"main\": \"src/EsriLeafletGeocoding.js\"\n },\n \"license\": \"Apache-2.0\",\n \"main\": \"dist/esri-leaflet-geocoder-debug.js\",\n \"browser\": \"dist/esri-leaflet-geocoder-debug.js\",\n \"readmeFilename\": \"README.md\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git@github.com:Esri/esri-leaflet-geocoder.git\"\n },\n \"scripts\": {\n \"prebuild\": \"mkdirp dist\",\n \"build\": \"rollup -c profiles/debug.js & rollup -c profiles/production.js & npm run css & npm run img\",\n \"css\": \"node-sass ./src/esri-leaflet-geocoder.css ./dist/esri-leaflet-geocoder.css --output-style compressed\",\n \"img\": \"imagemin ./src/img ./dist/img\",\n \"lint\": \"semistandard src/**/*.js\",\n \"prepublish\": \"npm run build\",\n \"pretest\": \"npm run build\",\n \"release\": \"./scripts/release.sh\",\n \"start-watch\": \"watch \\\"npm run build\\\" src\",\n \"start\": \"parallelshell \\\"npm run start-watch\\\" \\\"http-server -p 5678 -c-1 -o\\\"\",\n \"test\": \"npm run lint && karma start\"\n },\n \"style\": \"./dist/esri-leaflet-geocoder.css\"\n}\n","import L from 'leaflet';\nimport { Task, Util } from 'esri-leaflet';\nimport { WorldGeocodingServiceUrl } from '../EsriLeafletGeocoding';\n\nexport var Geocode = Task.extend({\n path: 'find',\n\n params: {\n outSr: 4326,\n forStorage: false,\n outFields: '*',\n maxLocations: 20\n },\n\n setters: {\n 'address': 'address',\n 'neighborhood': 'neighborhood',\n 'city': 'city',\n 'subregion': 'subregion',\n 'region': 'region',\n 'postal': 'postal',\n 'country': 'country',\n 'text': 'text',\n 'category': 'category',\n 'token': 'token',\n 'key': 'magicKey',\n 'fields': 'outFields',\n 'forStorage': 'forStorage',\n 'maxLocations': 'maxLocations'\n },\n\n initialize: function (options) {\n options = options || {};\n options.url = options.url || WorldGeocodingServiceUrl;\n Task.prototype.initialize.call(this, options);\n },\n\n within: function (bounds) {\n bounds = L.latLngBounds(bounds);\n this.params.bbox = Util.boundsToExtent(bounds);\n return this;\n },\n\n nearby: function (latlng, radius) {\n latlng = L.latLng(latlng);\n this.params.location = latlng.lng + ',' + latlng.lat;\n this.params.distance = Math.min(Math.max(radius, 2000), 50000);\n return this;\n },\n\n run: function (callback, context) {\n if (this.options.customParam) {\n this.path = 'findAddressCandidates';\n this.params[this.options.customParam] = this.params.text;\n delete this.params.text;\n } else {\n this.path = (this.params.text) ? 'find' : 'findAddressCandidates';\n }\n\n if (this.path === 'findAddressCandidates' && this.params.bbox) {\n this.params.searchExtent = this.params.bbox;\n delete this.params.bbox;\n }\n\n return this.request(function (error, response) {\n var processor = (this.path === 'find') ? this._processFindResponse : this._processFindAddressCandidatesResponse;\n var results = (!error) ? processor(response) : undefined;\n callback.call(context, error, { results: results }, response);\n }, this);\n },\n\n _processFindResponse: function (response) {\n var results = [];\n\n for (var i = 0; i < response.locations.length; i++) {\n var location = response.locations[i];\n var bounds;\n\n if (location.extent) {\n bounds = Util.extentToBounds(location.extent);\n }\n\n results.push({\n text: location.name,\n bounds: bounds,\n score: location.feature.attributes.Score,\n latlng: L.latLng(location.feature.geometry.y, location.feature.geometry.x),\n properties: location.feature.attributes\n });\n }\n\n return results;\n },\n\n _processFindAddressCandidatesResponse: function (response) {\n var results = [];\n\n for (var i = 0; i < response.candidates.length; i++) {\n var candidate = response.candidates[i];\n if (candidate.extent) {\n var bounds = Util.extentToBounds(candidate.extent);\n }\n\n results.push({\n text: candidate.address,\n bounds: bounds,\n score: candidate.score,\n latlng: L.latLng(candidate.location.y, candidate.location.x),\n properties: candidate.attributes\n });\n }\n\n return results;\n }\n\n});\n\nexport function geocode (options) {\n return new Geocode(options);\n}\n\nexport default geocode;\n","import L from 'leaflet';\nimport { Task } from 'esri-leaflet';\nimport { WorldGeocodingServiceUrl } from '../EsriLeafletGeocoding';\n\nexport var ReverseGeocode = Task.extend({\n path: 'reverseGeocode',\n\n params: {\n outSR: 4326,\n returnIntersection: false\n },\n\n setters: {\n 'distance': 'distance',\n 'language': 'langCode',\n 'intersection': 'returnIntersection'\n },\n\n initialize: function (options) {\n options = options || {};\n options.url = options.url || WorldGeocodingServiceUrl;\n Task.prototype.initialize.call(this, options);\n },\n\n latlng: function (latlng) {\n latlng = L.latLng(latlng);\n this.params.location = latlng.lng + ',' + latlng.lat;\n return this;\n },\n\n run: function (callback, context) {\n return this.request(function (error, response) {\n var result;\n\n if (!error) {\n result = {\n latlng: L.latLng(response.location.y, response.location.x),\n address: response.address\n };\n } else {\n result = undefined;\n }\n\n callback.call(context, error, result, response);\n }, this);\n }\n});\n\nexport function reverseGeocode (options) {\n return new ReverseGeocode(options);\n}\n\nexport default reverseGeocode;\n","import L from 'leaflet';\nimport { Task, Util } from 'esri-leaflet';\nimport { WorldGeocodingServiceUrl } from '../EsriLeafletGeocoding';\n\nexport var Suggest = Task.extend({\n path: 'suggest',\n\n params: {},\n\n setters: {\n text: 'text',\n category: 'category',\n countries: 'countryCode',\n maxSuggestions: 'maxSuggestions'\n },\n\n initialize: function (options) {\n options = options || {};\n if (!options.url) {\n options.url = WorldGeocodingServiceUrl;\n options.supportsSuggest = true;\n }\n Task.prototype.initialize.call(this, options);\n },\n\n within: function (bounds) {\n bounds = L.latLngBounds(bounds);\n bounds = bounds.pad(0.5);\n var center = bounds.getCenter();\n var ne = bounds.getNorthWest();\n this.params.location = center.lng + ',' + center.lat;\n this.params.distance = Math.min(Math.max(center.distanceTo(ne), 2000), 50000);\n this.params.searchExtent = Util.boundsToExtent(bounds);\n return this;\n },\n\n nearby: function (latlng, radius) {\n latlng = L.latLng(latlng);\n this.params.location = latlng.lng + ',' + latlng.lat;\n this.params.distance = Math.min(Math.max(radius, 2000), 50000);\n return this;\n },\n\n run: function (callback, context) {\n if (this.options.supportsSuggest) {\n return this.request(function (error, response) {\n callback.call(context, error, response, response);\n }, this);\n } else {\n console.warn('this geocoding service does not support asking for suggestions');\n }\n }\n\n});\n\nexport function suggest (options) {\n return new Suggest(options);\n}\n\nexport default suggest;\n","import { Service } from 'esri-leaflet';\nimport { WorldGeocodingServiceUrl } from '../EsriLeafletGeocoding';\nimport geocode from '../Tasks/Geocode';\nimport reverseGeocode from '../Tasks/ReverseGeocode';\nimport suggest from '../Tasks/Suggest';\n\nexport var GeocodeService = Service.extend({\n initialize: function (options) {\n options = options || {};\n if (options.url) {\n Service.prototype.initialize.call(this, options);\n this._confirmSuggestSupport();\n } else {\n options.url = WorldGeocodingServiceUrl;\n options.supportsSuggest = true;\n Service.prototype.initialize.call(this, options);\n }\n },\n\n geocode: function () {\n return geocode(this);\n },\n\n reverse: function () {\n return reverseGeocode(this);\n },\n\n suggest: function () {\n // requires either the Esri World Geocoding Service or a <10.3 ArcGIS Server Geocoding Service that supports suggest.\n return suggest(this);\n },\n\n _confirmSuggestSupport: function () {\n this.metadata(function (error, response) {\n if (error) { return; }\n // pre 10.3 geocoding services dont list capabilities (and dont support maxLocations)\n // since, only SOME individual services have been configured to support asking for suggestions\n if (!response.capabilities) {\n this.options.supportsSuggest = false;\n this.options.customParam = response.singleLineAddressField.name;\n } else if (response.capabilities.indexOf('Suggest') > -1) {\n this.options.supportsSuggest = true;\n } else {\n this.options.supportsSuggest = false;\n }\n }, this);\n }\n});\n\nexport function geocodeService (options) {\n return new GeocodeService(options);\n}\n\nexport default geocodeService;\n","import L from 'leaflet';\n\nexport var GeosearchCore = L.Evented.extend({\n\n options: {\n zoomToResult: true,\n useMapBounds: 12,\n searchBounds: null\n },\n\n initialize: function (control, options) {\n L.Util.setOptions(this, options);\n this._control = control;\n\n if (!options || !options.providers || !options.providers.length) {\n throw new Error('You must specify at least one provider');\n }\n\n this._providers = options.providers;\n },\n\n _geocode: function (text, key, provider) {\n var activeRequests = 0;\n var allResults = [];\n var bounds;\n\n var callback = L.Util.bind(function (error, results) {\n activeRequests--;\n if (error) {\n return;\n }\n\n if (results) {\n allResults = allResults.concat(results);\n }\n\n if (activeRequests <= 0) {\n bounds = this._boundsFromResults(allResults);\n\n this.fire('results', {\n results: allResults,\n bounds: bounds,\n latlng: (bounds) ? bounds.getCenter() : undefined,\n text: text\n }, true);\n\n if (this.options.zoomToResult && bounds) {\n this._control._map.fitBounds(bounds);\n }\n\n this.fire('load');\n }\n }, this);\n\n if (key) {\n activeRequests++;\n provider.results(text, key, this._searchBounds(), callback);\n } else {\n for (var i = 0; i < this._providers.length; i++) {\n activeRequests++;\n this._providers[i].results(text, key, this._searchBounds(), callback);\n }\n }\n },\n\n _suggest: function (text) {\n var activeRequests = this._providers.length;\n\n var createCallback = L.Util.bind(function (text, provider) {\n return L.Util.bind(function (error, suggestions) {\n if (error) { return; }\n\n var i;\n\n activeRequests = activeRequests - 1;\n\n if (text.length < 2) {\n this._suggestions.innerHTML = '';\n this._suggestions.style.display = 'none';\n return;\n }\n\n if (suggestions.length) {\n for (i = 0; i < suggestions.length; i++) {\n suggestions[i].provider = provider;\n }\n } else {\n // we still need to update the UI\n this._control._renderSuggestions(suggestions);\n }\n\n if (provider._lastRender !== text && provider.nodes) {\n for (i = 0; i < provider.nodes.length; i++) {\n if (provider.nodes[i].parentElement) {\n this._control._suggestions.removeChild(provider.nodes[i]);\n }\n }\n\n provider.nodes = [];\n }\n\n if (suggestions.length && this._control._input.value === text) {\n this._control.clearSuggestions(provider.nodes);\n\n provider._lastRender = text;\n provider.nodes = this._control._renderSuggestions(suggestions);\n this._control._nodes = [];\n }\n }, this);\n }, this);\n\n this._pendingSuggestions = [];\n\n for (var i = 0; i < this._providers.length; i++) {\n var provider = this._providers[i];\n var request = provider.suggestions(text, this._searchBounds(), createCallback(text, provider));\n this._pendingSuggestions.push(request);\n }\n },\n\n _searchBounds: function () {\n if (this.options.searchBounds !== null) {\n return this.options.searchBounds;\n }\n\n if (this.options.useMapBounds === false) {\n return null;\n }\n\n if (this.options.useMapBounds === true) {\n return this._control._map.getBounds();\n }\n\n if (this.options.useMapBounds <= this._control._map.getZoom()) {\n return this._control._map.getBounds();\n }\n\n return null;\n },\n\n _boundsFromResults: function (results) {\n if (!results.length) {\n return;\n }\n\n var nullIsland = L.latLngBounds([0, 0], [0, 0]);\n var resultBounds = [];\n var resultLatlngs = [];\n\n // collect the bounds and center of each result\n for (var i = results.length - 1; i >= 0; i--) {\n var result = results[i];\n\n resultLatlngs.push(result.latlng);\n\n // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present\n if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) {\n resultBounds.push(result.bounds);\n }\n }\n\n // form a bounds object containing all center points\n var bounds = L.latLngBounds(resultLatlngs);\n\n // and extend it to contain all bounds objects\n for (var j = 0; j < resultBounds.length; j++) {\n bounds.extend(resultBounds[j]);\n }\n\n return bounds;\n },\n\n _getAttribution: function () {\n var attribs = [];\n var providers = this._providers;\n\n for (var i = 0; i < providers.length; i++) {\n if (providers[i].options.attribution) {\n attribs.push(providers[i].options.attribution);\n }\n }\n\n return attribs.join(', ');\n }\n\n});\n\nexport function geosearchCore (control, options) {\n return new GeosearchCore(control, options);\n}\n\nexport default geosearchCore;\n","import { GeocodeService } from '../Services/Geocode';\n\nexport var ArcgisOnlineProvider = GeocodeService.extend({\n options: {\n label: 'Places and Addresses',\n maxResults: 5\n },\n\n suggestions: function (text, bounds, callback) {\n var request = this.suggest().text(text);\n\n if (bounds) {\n request.within(bounds);\n }\n\n if (this.options.countries) {\n request.countries(this.options.countries);\n }\n\n if (this.options.categories) {\n request.category(this.options.categories);\n }\n\n // 15 is the maximum number of suggestions that can be returned\n request.maxSuggestions(this.options.maxResults);\n\n return request.run(function (error, results, response) {\n var suggestions = [];\n if (!error) {\n while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) {\n var suggestion = response.suggestions.shift();\n if (!suggestion.isCollection) {\n suggestions.push({\n text: suggestion.text,\n magicKey: suggestion.magicKey\n });\n }\n }\n }\n callback(error, suggestions);\n }, this);\n },\n\n results: function (text, key, bounds, callback) {\n var request = this.geocode().text(text);\n\n if (key) {\n request.key(key);\n }\n // in the future Address/StreetName geocoding requests that include a magicKey will only return one match\n request.maxLocations(this.options.maxResults);\n\n if (bounds) {\n request.within(bounds);\n }\n\n if (this.options.forStorage) {\n request.forStorage(true);\n }\n\n return request.run(function (error, response) {\n callback(error, response.results);\n }, this);\n }\n});\n\nexport function arcgisOnlineProvider (options) {\n return new ArcgisOnlineProvider(options);\n}\n\nexport default arcgisOnlineProvider;\n","import L from 'leaflet';\nimport { geosearchCore } from '../Classes/GeosearchCore';\nimport { arcgisOnlineProvider } from '../Providers/ArcgisOnlineGeocoder';\nimport { Util } from 'esri-leaflet';\n\nexport var Geosearch = L.Control.extend({\n includes: L.Mixin.Events,\n\n options: {\n position: 'topleft',\n collapseAfterResult: true,\n expanded: false,\n allowMultipleResults: true,\n placeholder: 'Search for places or addresses',\n title: 'Location Search'\n },\n\n initialize: function (options) {\n L.Util.setOptions(this, options);\n\n if (!options || !options.providers || !options.providers.length) {\n options = {};\n options.providers = [ arcgisOnlineProvider() ];\n }\n\n // instantiate the underlying class and pass along options\n this._geosearchCore = geosearchCore(this, options);\n this._geosearchCore._providers = options.providers;\n\n // bubble each providers events to the control\n this._geosearchCore.addEventParent(this);\n for (var i = 0; i < this._geosearchCore._providers.length; i++) {\n this._geosearchCore._providers[i].addEventParent(this);\n }\n\n this._geosearchCore._pendingSuggestions = [];\n\n L.Control.prototype.initialize.call(options);\n },\n\n _renderSuggestions: function (suggestions) {\n var currentGroup;\n this._suggestions.style.display = 'block';\n\n // set the maxHeight of the suggestions box to\n // map height\n // - suggestions offset (distance from top of suggestions to top of control)\n // - control offset (distance from top of control to top of map)\n // - 10 (extra padding)\n this._suggestions.style.maxHeight = (this._map.getSize().y - this._suggestions.offsetTop - this._wrapper.offsetTop - 10) + 'px';\n\n var nodes = [];\n var list;\n var header;\n\n for (var i = 0; i < suggestions.length; i++) {\n var suggestion = suggestions[i];\n if (!header && this._geosearchCore._providers.length > 1 && currentGroup !== suggestion.provider.options.label) {\n header = L.DomUtil.create('span', 'geocoder-control-header', this._suggestions);\n header.textContent = suggestion.provider.options.label;\n header.innerText = suggestion.provider.options.label;\n currentGroup = suggestion.provider.options.label;\n nodes.push(header);\n }\n\n if (!list) {\n list = L.DomUtil.create('ul', 'geocoder-control-list', this._suggestions);\n }\n\n var suggestionItem = L.DomUtil.create('li', 'geocoder-control-suggestion', list);\n\n suggestionItem.innerHTML = suggestion.text;\n suggestionItem.provider = suggestion.provider;\n suggestionItem['data-magic-key'] = suggestion.magicKey;\n }\n\n L.DomUtil.removeClass(this._input, 'geocoder-control-loading');\n\n nodes.push(list);\n\n return nodes;\n },\n\n _boundsFromResults: function (results) {\n if (!results.length) {\n return;\n }\n\n var nullIsland = L.latLngBounds([0, 0], [0, 0]);\n var resultBounds = [];\n var resultLatlngs = [];\n\n // collect the bounds and center of each result\n for (var i = results.length - 1; i >= 0; i--) {\n var result = results[i];\n\n resultLatlngs.push(result.latlng);\n\n // make sure bounds are valid and not 0,0. sometimes bounds are incorrect or not present\n if (result.bounds && result.bounds.isValid() && !result.bounds.equals(nullIsland)) {\n resultBounds.push(result.bounds);\n }\n }\n\n // form a bounds object containing all center points\n var bounds = L.latLngBounds(resultLatlngs);\n\n // and extend it to contain all bounds objects\n for (var j = 0; j < resultBounds.length; j++) {\n bounds.extend(resultBounds[j]);\n }\n\n return bounds;\n },\n\n clear: function () {\n this._suggestions.innerHTML = '';\n this._suggestions.style.display = 'none';\n this._input.value = '';\n\n if (this.options.collapseAfterResult) {\n this._input.placeholder = '';\n L.DomUtil.removeClass(this._wrapper, 'geocoder-control-expanded');\n }\n\n if (!this._map.scrollWheelZoom.enabled() && this._map.options.scrollWheelZoom) {\n this._map.scrollWheelZoom.enable();\n }\n },\n\n clearSuggestions: function () {\n if (this._nodes) {\n for (var k = 0; k < this._nodes.length; k++) {\n if (this._nodes[k].parentElement) {\n this._suggestions.removeChild(this._nodes[k]);\n }\n }\n }\n },\n\n _setupClick: function () {\n L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\n this._input.focus();\n },\n\n disable: function () {\n this._input.disabled = true;\n L.DomUtil.addClass(this._input, 'geocoder-control-input-disabled');\n L.DomEvent.removeListener(this._wrapper, 'click', this._setupClick, this);\n },\n\n enable: function () {\n this._input.disabled = false;\n L.DomUtil.removeClass(this._input, 'geocoder-control-input-disabled');\n L.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this);\n },\n\n getAttribution: function () {\n var attribs = [];\n\n for (var i = 0; i < this._providers.length; i++) {\n if (this._providers[i].options.attribution) {\n attribs.push(this._providers[i].options.attribution);\n }\n }\n\n return attribs.join(', ');\n },\n\n onAdd: function (map) {\n // include 'Powered by Esri' in map attribution\n Util.setEsriAttribution(map);\n\n this._map = map;\n this._wrapper = L.DomUtil.create('div', 'geocoder-control');\n this._input = L.DomUtil.create('input', 'geocoder-control-input leaflet-bar', this._wrapper);\n this._input.title = this.options.title;\n\n if (this.options.expanded) {\n L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\n this._input.placeholder = this.options.placeholder;\n }\n\n this._suggestions = L.DomUtil.create('div', 'geocoder-control-suggestions leaflet-bar', this._wrapper);\n\n var credits = this._geosearchCore._getAttribution();\n map.attributionControl.addAttribution(credits);\n\n L.DomEvent.addListener(this._input, 'focus', function (e) {\n this._input.placeholder = this.options.placeholder;\n L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\n }, this);\n\n L.DomEvent.addListener(this._wrapper, 'click', this._setupClick, this);\n\n L.DomEvent.addListener(this._suggestions, 'mousedown', function (e) {\n var suggestionItem = e.target || e.srcElement;\n this._geosearchCore._geocode(suggestionItem.innerHTML, suggestionItem['data-magic-key'], suggestionItem.provider);\n this.clear();\n }, this);\n\n L.DomEvent.addListener(this._input, 'blur', function (e) {\n this.clear();\n }, this);\n\n L.DomEvent.addListener(this._input, 'keydown', function (e) {\n L.DomUtil.addClass(this._wrapper, 'geocoder-control-expanded');\n\n var list = this._suggestions.querySelectorAll('.' + 'geocoder-control-suggestion');\n var selected = this._suggestions.querySelectorAll('.' + 'geocoder-control-selected')[0];\n var selectedPosition;\n\n for (var i = 0; i < list.length; i++) {\n if (list[i] === selected) {\n selectedPosition = i;\n break;\n }\n }\n\n switch (e.keyCode) {\n case 13:\n if (selected) {\n this._geosearchCore._geocode(selected.innerHTML, selected['data-magic-key'], selected.provider);\n this.clear();\n } else if (this.options.allowMultipleResults) {\n this._geosearchCore._geocode(this._input.value, undefined);\n this.clear();\n } else {\n L.DomUtil.addClass(list[0], 'geocoder-control-selected');\n }\n L.DomEvent.preventDefault(e);\n break;\n case 38:\n if (selected) {\n L.DomUtil.removeClass(selected, 'geocoder-control-selected');\n }\n\n var previousItem = list[selectedPosition - 1];\n\n if (selected && previousItem) {\n L.DomUtil.addClass(previousItem, 'geocoder-control-selected');\n } else {\n L.DomUtil.addClass(list[list.length - 1], 'geocoder-control-selected');\n }\n L.DomEvent.preventDefault(e);\n break;\n case 40:\n if (selected) {\n L.DomUtil.removeClass(selected, 'geocoder-control-selected');\n }\n\n var nextItem = list[selectedPosition + 1];\n\n if (selected && nextItem) {\n L.DomUtil.addClass(nextItem, 'geocoder-control-selected');\n } else {\n L.DomUtil.addClass(list[0], 'geocoder-control-selected');\n }\n L.DomEvent.preventDefault(e);\n break;\n default:\n // when the input changes we should cancel all pending suggestion requests if possible to avoid result collisions\n for (var x = 0; x < this._geosearchCore._pendingSuggestions.length; x++) {\n var request = this._geosearchCore._pendingSuggestions[x];\n if (request && request.abort && !request.id) {\n request.abort();\n }\n }\n break;\n }\n }, this);\n\n L.DomEvent.addListener(this._input, 'keyup', L.Util.throttle(function (e) {\n var key = e.which || e.keyCode;\n var text = (e.target || e.srcElement).value;\n\n // require at least 2 characters for suggestions\n if (text.length < 2) {\n this._suggestions.innerHTML = '';\n this._suggestions.style.display = 'none';\n L.DomUtil.removeClass(this._input, 'geocoder-control-loading');\n return;\n }\n\n // if this is the escape key it will clear the input so clear suggestions\n if (key === 27) {\n this._suggestions.innerHTML = '';\n this._suggestions.style.display = 'none';\n return;\n }\n\n // if this is NOT the up/down arrows or enter make a suggestion\n if (key !== 13 && key !== 38 && key !== 40) {\n if (this._input.value !== this._lastValue) {\n this._lastValue = this._input.value;\n L.DomUtil.addClass(this._input, 'geocoder-control-loading');\n this._geosearchCore._suggest(text);\n }\n }\n }, 50, this), this);\n\n L.DomEvent.disableClickPropagation(this._wrapper);\n\n // when mouse moves over suggestions disable scroll wheel zoom if its enabled\n L.DomEvent.addListener(this._suggestions, 'mouseover', function (e) {\n if (map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) {\n map.scrollWheelZoom.disable();\n }\n });\n\n // when mouse moves leaves suggestions enable scroll wheel zoom if its disabled\n L.DomEvent.addListener(this._suggestions, 'mouseout', function (e) {\n if (!map.scrollWheelZoom.enabled() && map.options.scrollWheelZoom) {\n map.scrollWheelZoom.enable();\n }\n });\n\n this._geosearchCore.on('load', function (e) {\n L.DomUtil.removeClass(this._input, 'geocoder-control-loading');\n this.clear();\n this._input.blur();\n }, this);\n\n return this._wrapper;\n }\n});\n\nexport function geosearch (options) {\n return new Geosearch(options);\n}\n\nexport default geosearch;\n","import L from 'leaflet';\nimport { FeatureLayerService } from 'esri-leaflet';\n\nexport var FeatureLayerProvider = FeatureLayerService.extend({\n options: {\n label: 'Feature Layer',\n maxResults: 5,\n bufferRadius: 1000,\n formatSuggestion: function (feature) {\n return feature.properties[this.options.searchFields[0]];\n }\n },\n\n initialize: function (options) {\n FeatureLayerService.prototype.initialize.call(this, options);\n if (typeof this.options.searchFields === 'string') {\n this.options.searchFields = [this.options.searchFields];\n }\n this._suggestionsQuery = this.query();\n this._resultsQuery = this.query();\n },\n\n suggestions: function (text, bounds, callback) {\n var query = this._suggestionsQuery.where(this._buildQuery(text))\n .returnGeometry(false);\n\n if (bounds) {\n query.intersects(bounds);\n }\n\n if (this.options.idField) {\n query.fields([this.options.idField].concat(this.options.searchFields));\n }\n\n var request = query.run(function (error, results, raw) {\n if (error) {\n callback(error, []);\n } else {\n this.options.idField = raw.objectIdFieldName;\n var suggestions = [];\n for (var i = results.features.length - 1; i >= 0; i--) {\n var feature = results.features[i];\n suggestions.push({\n text: this.options.formatSuggestion.call(this, feature),\n magicKey: feature.id\n });\n }\n callback(error, suggestions.slice(0, this.options.maxResults));\n }\n }, this);\n\n return request;\n },\n\n results: function (text, key, bounds, callback) {\n var query = this._resultsQuery;\n\n if (key) {\n query.featureIds([key]);\n } else {\n query.where(this._buildQuery(text));\n }\n\n if (bounds) {\n query.within(bounds);\n }\n\n return query.run(L.Util.bind(function (error, features) {\n var results = [];\n for (var i = 0; i < features.features.length; i++) {\n var feature = features.features[i];\n if (feature) {\n var bounds = this._featureBounds(feature);\n\n var result = {\n latlng: bounds.getCenter(),\n bounds: bounds,\n text: this.options.formatSuggestion.call(this, feature),\n properties: feature.properties,\n geojson: feature\n };\n\n results.push(result);\n }\n }\n callback(error, results);\n }, this));\n },\n\n orderBy: function (fieldName, order) {\n this._suggestionsQuery.orderBy(fieldName, order);\n },\n\n _buildQuery: function (text) {\n var queryString = [];\n\n for (var i = this.options.searchFields.length - 1; i >= 0; i--) {\n var field = 'upper(\"' + this.options.searchFields[i] + '\")';\n\n queryString.push(field + \" LIKE upper('%\" + text + \"%')\");\n }\n\n if (this.options.where) {\n return this.options.where + ' AND (' + queryString.join(' OR ') + ')';\n } else {\n return queryString.join(' OR ');\n }\n },\n\n _featureBounds: function (feature) {\n var geojson = L.geoJson(feature);\n if (feature.geometry.type === 'Point') {\n var center = geojson.getBounds().getCenter();\n var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat);\n var latRadius = (this.options.bufferRadius / 40075017) * 360;\n return L.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]);\n } else {\n return geojson.getBounds();\n }\n }\n});\n\nexport function featureLayerProvider (options) {\n return new FeatureLayerProvider(options);\n}\n\nexport default featureLayerProvider;\n","import L from 'leaflet';\nimport { MapService } from 'esri-leaflet';\n\nexport var MapServiceProvider = MapService.extend({\n options: {\n layers: [0],\n label: 'Map Service',\n bufferRadius: 1000,\n maxResults: 5,\n formatSuggestion: function (feature) {\n return feature.properties[feature.displayFieldName] + ' ' + feature.layerName + '';\n }\n },\n\n initialize: function (options) {\n MapService.prototype.initialize.call(this, options);\n this._getIdFields();\n },\n\n suggestions: function (text, bounds, callback) {\n var request = this.find().text(text).fields(this.options.searchFields).returnGeometry(false).layers(this.options.layers);\n\n return request.run(function (error, results, raw) {\n var suggestions = [];\n if (!error) {\n var count = Math.min(this.options.maxResults, results.features.length);\n raw.results = raw.results.reverse();\n for (var i = 0; i < count; i++) {\n var feature = results.features[i];\n var result = raw.results[i];\n var layer = result.layerId;\n var idField = this._idFields[layer];\n feature.layerId = layer;\n feature.layerName = this._layerNames[layer];\n feature.displayFieldName = this._displayFields[layer];\n if (idField) {\n suggestions.push({\n text: this.options.formatSuggestion.call(this, feature),\n magicKey: result.attributes[idField] + ':' + layer\n });\n }\n }\n }\n callback(error, suggestions.reverse());\n }, this);\n },\n\n results: function (text, key, bounds, callback) {\n var results = [];\n var request;\n\n if (key) {\n var featureId = key.split(':')[0];\n var layer = key.split(':')[1];\n request = this.query().layer(layer).featureIds(featureId);\n } else {\n request = this.find().text(text).fields(this.options.searchFields).layers(this.options.layers);\n }\n\n return request.run(function (error, features, response) {\n if (!error) {\n if (response.results) {\n response.results = response.results.reverse();\n }\n for (var i = 0; i < features.features.length; i++) {\n var feature = features.features[i];\n layer = layer || response.results[i].layerId;\n\n if (feature && layer !== undefined) {\n var bounds = this._featureBounds(feature);\n feature.layerId = layer;\n feature.layerName = this._layerNames[layer];\n feature.displayFieldName = this._displayFields[layer];\n\n var result = {\n latlng: bounds.getCenter(),\n bounds: bounds,\n text: this.options.formatSuggestion.call(this, feature),\n properties: feature.properties,\n geojson: feature\n };\n\n results.push(result);\n }\n }\n }\n callback(error, results.reverse());\n }, this);\n },\n\n _featureBounds: function (feature) {\n var geojson = L.geoJson(feature);\n if (feature.geometry.type === 'Point') {\n var center = geojson.getBounds().getCenter();\n var lngRadius = ((this.options.bufferRadius / 40075017) * 360) / Math.cos((180 / Math.PI) * center.lat);\n var latRadius = (this.options.bufferRadius / 40075017) * 360;\n return L.latLngBounds([center.lat - latRadius, center.lng - lngRadius], [center.lat + latRadius, center.lng + lngRadius]);\n } else {\n return geojson.getBounds();\n }\n },\n\n _layerMetadataCallback: function (layerid) {\n return L.Util.bind(function (error, metadata) {\n if (error) { return; }\n this._displayFields[layerid] = metadata.displayField;\n this._layerNames[layerid] = metadata.name;\n for (var i = 0; i < metadata.fields.length; i++) {\n var field = metadata.fields[i];\n if (field.type === 'esriFieldTypeOID') {\n this._idFields[layerid] = field.name;\n break;\n }\n }\n }, this);\n },\n\n _getIdFields: function () {\n this._idFields = {};\n this._displayFields = {};\n this._layerNames = {};\n for (var i = 0; i < this.options.layers.length; i++) {\n var layer = this.options.layers[i];\n this.get(layer, {}, this._layerMetadataCallback(layer));\n }\n }\n});\n\nexport function mapServiceProvider (options) {\n return new MapServiceProvider(options);\n}\n\nexport default mapServiceProvider;\n","import { GeocodeService } from '../Services/Geocode';\n\nexport var GeocodeServiceProvider = GeocodeService.extend({\n options: {\n label: 'Geocode Server',\n maxResults: 5\n },\n\n suggestions: function (text, bounds, callback) {\n if (this.options.supportsSuggest) {\n var request = this.suggest().text(text);\n if (bounds) {\n request.within(bounds);\n }\n\n return request.run(function (error, results, response) {\n var suggestions = [];\n if (!error) {\n while (response.suggestions.length && suggestions.length <= (this.options.maxResults - 1)) {\n var suggestion = response.suggestions.shift();\n if (!suggestion.isCollection) {\n suggestions.push({\n text: suggestion.text,\n magicKey: suggestion.magicKey\n });\n }\n }\n }\n callback(error, suggestions);\n }, this);\n } else {\n callback(undefined, []);\n return false;\n }\n },\n\n results: function (text, key, bounds, callback) {\n var request = this.geocode().text(text);\n\n request.maxLocations(this.options.maxResults);\n\n if (bounds) {\n request.within(bounds);\n }\n\n return request.run(function (error, response) {\n callback(error, response.results);\n }, this);\n }\n});\n\nexport function geocodeServiceProvider (options) {\n return new GeocodeServiceProvider(options);\n}\n\nexport default geocodeServiceProvider;\n","export { version as VERSION } from '../package.json';\nexport var WorldGeocodingServiceUrl = 'https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/';\n\n// import tasks\nexport { Geocode, geocode } from './Tasks/Geocode';\nexport { ReverseGeocode, reverseGeocode } from './Tasks/ReverseGeocode';\nexport { Suggest, suggest } from './Tasks/Suggest';\n\n// import service\nexport { GeocodeService, geocodeService } from './Services/Geocode';\n\n// import control\nexport { Geosearch, geosearch } from './Controls/Geosearch';\n\n// import supporting class\nexport { GeosearchCore, geosearchCore } from './Classes/GeosearchCore';\n\n// import providers\nexport { ArcgisOnlineProvider, arcgisOnlineProvider } from './Providers/ArcgisOnlineGeocoder';\nexport { FeatureLayerProvider, featureLayerProvider } from './Providers/FeatureLayer';\nexport { MapServiceProvider, mapServiceProvider } from './Providers/MapService';\nexport { GeocodeServiceProvider, geocodeServiceProvider } from './Providers/GeocodeService';\n"],"names":["geocode","options","Geocode","reverseGeocode","ReverseGeocode","suggest","Suggest","geocodeService","GeocodeService","geosearchCore","control","GeosearchCore","arcgisOnlineProvider","ArcgisOnlineProvider","geosearch","Geosearch","featureLayerProvider","FeatureLayerProvider","mapServiceProvider","MapServiceProvider","geocodeServiceProvider","GeocodeServiceProvider","Task","extend","path","params","outSr","forStorage","outFields","maxLocations","setters","address","neighborhood","city","subregion","region","postal","country","text","category","token","key","fields","initialize","url","WorldGeocodingServiceUrl","prototype","call","this","within","bounds","L","latLngBounds","bbox","Util","boundsToExtent","nearby","latlng","radius","latLng","location","lng","lat","distance","Math","min","max","run","callback","context","customParam","searchExtent","request","error","response","processor","_processFindResponse","_processFindAddressCandidatesResponse","results","undefined","i","locations","length","extent","extentToBounds","push","name","score","feature","attributes","Score","geometry","y","x","properties","candidates","candidate","outSR","returnIntersection","language","intersection","result","countries","maxSuggestions","supportsSuggest","pad","center","getCenter","ne","getNorthWest","distanceTo","console","warn","Service","_confirmSuggestSupport","reverse","metadata","capabilities","indexOf","singleLineAddressField","Evented","zoomToResult","useMapBounds","searchBounds","setOptions","_control","providers","Error","_providers","_geocode","provider","activeRequests","allResults","bind","concat","_boundsFromResults","fire","_map","fitBounds","_searchBounds","_suggest","createCallback","suggestions","_suggestions","innerHTML","style","display","_renderSuggestions","_lastRender","nodes","parentElement","removeChild","_input","value","clearSuggestions","_nodes","_pendingSuggestions","getBounds","getZoom","nullIsland","resultBounds","resultLatlngs","isValid","equals","j","_getAttribution","attribs","attribution","join","label","maxResults","categories","suggestion","shift","isCollection","magicKey","Control","includes","Mixin","Events","position","collapseAfterResult","expanded","allowMultipleResults","placeholder","title","_geosearchCore","addEventParent","currentGroup","maxHeight","getSize","offsetTop","_wrapper","list","header","DomUtil","create","textContent","innerText","suggestionItem","removeClass","clear","scrollWheelZoom","enabled","enable","k","_setupClick","addClass","focus","disable","disabled","DomEvent","removeListener","addListener","getAttribution","onAdd","map","setEsriAttribution","credits","attributionControl","addAttribution","e","target","srcElement","selectedPosition","querySelectorAll","selected","keyCode","preventDefault","previousItem","nextItem","abort","id","throttle","which","_lastValue","disableClickPropagation","on","blur","FeatureLayerService","bufferRadius","formatSuggestion","searchFields","_suggestionsQuery","query","_resultsQuery","where","_buildQuery","returnGeometry","intersects","idField","raw","objectIdFieldName","features","slice","featureIds","_featureBounds","geojson","orderBy","fieldName","order","queryString","field","geoJson","type","lngRadius","cos","PI","latRadius","MapService","layers","displayFieldName","layerName","_getIdFields","find","count","layer","layerId","_idFields","_layerNames","_displayFields","featureId","split","_layerMetadataCallback","layerid","displayField","get"],"mappings":";;;+UCqHO,SAASA,GAASC,GACvB,MAAO,IAAIC,GAAQD,GCtEd,QAASE,GAAgBF,GAC9B,MAAO,IAAIG,GAAeH,GCMrB,QAASI,GAASJ,GACvB,MAAO,IAAIK,GAAQL,GCPd,QAASM,GAAgBN,GAC9B,MAAO,IAAIO,GAAeP,GCyIrB,QAASQ,GAAeC,EAAST,GACtC,MAAO,IAAIU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B,CACrCxN,KAAKsO,UAAUM,GAAWtB,EAAMhL,IAChC,WAGHtC,OAGLiO,aAAc,WACZjO,KAAKsO,aACLtO,KAAKwO,kBACLxO,KAAKuO,cACL,KAAK,GAAIvM,GAAI,EAAGA,EAAIhC,KAAK/C,QAAQ6Q,OAAO5L,OAAQF,IAAK,CACnD,GAAIoM,GAAQpO,KAAK/C,QAAQ6Q,OAAO9L,EAChChC,MAAK8O,IAAIV,KAAWpO,KAAK2O,uBAAuBP,QCzH3C/P,EAAyBb,EAAee,QACjDtB,SACEwK,MAAO,iBACPC,WAAY,GAGd5B,YAAa,SAAUxG,EAAMY,EAAQkB,GACnC,GAAIpB,KAAK/C,QAAQuG,gBAAiB,CAChC,GAAIhC,GAAUxB,KAAK3C,UAAUiC,KAAKA,EAKlC,OAJIY,IACFsB,EAAQvB,OAAOC,GAGVsB,EAAQL,IAAI,SAAUM,EAAOK,EAASJ,GAC3C,GAAIoE,KACJ,KAAKrE,EACH,KAAOC,EAASoE,YAAY5D,QAAU4D,EAAY5D,QAAWlC,KAAK/C,QAAQyK,WAAa,GAAI,CACzF,GAAIE,GAAalG,EAASoE,YAAY+B,OACjCD,GAAWE,cACdhC,EAAYzD,MACV/C,KAAMsI,EAAWtI,KACjByI,SAAUH,EAAWG,WAK7B3G,EAASK,EAAOqE,IACf9F,MAGH,MADAoB,GAASW,YACF,GAIXD,QAAS,SAAUxC,EAAMG,EAAKS,EAAQkB,GACpC,GAAII,GAAUxB,KAAKhD,UAAUsC,KAAKA,EAQlC,OANAkC,GAAQ3C,aAAamB,KAAK/C,QAAQyK,YAE9BxH,GACFsB,EAAQvB,OAAOC,GAGVsB,EAAQL,IAAI,SAAUM,EAAOC,GAClCN,EAASK,EAAOC,EAASI,UACxB9B,SC9CIH,EAA2B"} \ No newline at end of file diff --git a/dist/img/loading.gif b/dist/img/loading.gif new file mode 100755 index 0000000000000000000000000000000000000000..d123f8803336f9a9dd844217f503ce1a4c8bb6de GIT binary patch literal 1276 zcmZ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A#JL{$)^*poqFo=LqM6W#hPv8`x6oeg}=D`q2S1U8ToZXGGnP<4u(!P!4XpC1(#O z*)!yBxBy*u#|G5^^Biw74AVG>*zCAvT6Y#ftVUgv_FvdhXRE)wQre^HEwbf4vv%ZE zq)#tJ%Qwa`h2--DavF>!g)j&;Ms5xn9mI*CDjeIx?7>&Atb-Gn@ZLV0kBAbrUFCAw z(Cqwx5MC=c#G`!{TsnJ)&zIS{J>CT)6^d%Pj_^3xQHxzUG&P^x&9Ao&AiNgCEdsno z!SV6Q0ve3cr9mf-yMrXqTA)SRQj<%BGexCnsF*V7t!d?(hfZ~O8VI_<_4#wZ@Bfbqe=jV#-XYF4k)jLf;~aKg@_qc*?JKvj9fHE;Esw?0<`Ay z1WzqTUokBRU*?%G^CHL;>dJDHYPf^3qoOK4eh|A>1xV&o!ZMx1pS+9%3we z!g+H~N{C@o$@L=3N{`G}XgegAQ=2$}cZ($#$MWvQ^0Q!tNZFfp0OQ%ueIzyhA)v~$ zBrJ56O@IO~J`sc-bU$^?r)i3i#J+?LDeQS`XhihY3x0h-cIL~sQ(K&&Ipa*hI z1-apRNnWKSF$2C?)_^5F@&Xz7IhX{(>*r9&NPr`?01olBlvL&zOk|}9lH!1Y;8CP3 zaXOd$eRYh~#-mvp82neETYWm5|0ndH0i{IMN%Rx zp2wUDb0Xh7g-xF{MdDTeQ`l$!G6MPU$MwE)2!kOiIHTx<`bi0Kqm#UZW-C#QS^y0S oDLRnrRVIYB_)77>l`lsT$1KGnhpnR^UF^^`D%=tG3Gb!<2GL#a_W%F@ literal 0 HcmV?d00001 diff --git a/dist/img/search-disabled.png b/dist/img/search-disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..fefe60df9631b6e7a456d8671fde045119bd8045 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkj3?z4meXamfoB=)|u4-y(|NsBry?b}_1>u!I zL8g)*zhDN2vdL#HfV?747sn8d^Jgy^axn*TxL$038sD{AlI_x&tbai|PuCfRy74aY zG+l4KV9|m&+o~CS6DQe4ZSdv`WcqZ?)53StrKv){+nqkun=Dt*p8Mu%IpeWwJ>9F` z8z|&u=5A7{?bJ&**Ijh7&4uscQ|IiED4P%QTKVt!uW`mMFpvV;&fw|l=d#Wzp$PzJ C=}W}` literal 0 HcmV?d00001 diff --git a/dist/img/search.png b/dist/img/search.png new file mode 100644 index 0000000000000000000000000000000000000000..0d01c4545e01d6d9773221a7209b6bc86b364cd4 GIT binary patch literal 425 zcmV;a0apHrP)~EiaUMAvsUQr<`5(fS6Ajfg^kM(H9D=zWr_l)bhzTZ_G;Kx*B4No}6 z1@1BUn-P^5`b%+uF6?0+QH*0to=@8d8j+AW%xdikoMIU}$e4mmf879HFrU@_j76EZ z?jR#F1vTOUA3l9Ia&52?bcYty`t-HS_0~pE3guWunbzKhIIeMKV=?SvLl#9R4pE0b z2_F7wKjpHIMlppijG-S#c*iz|Yz3*KV+qZuLIrwpg-RsRWFttgHyN3#3E4k2*vy*4 zKL_b`j!C)iz(T%)RIOu0?x)d{uOL-3IFVC5=j9!w)Tt4Zxq1xWuwjs~z6BTnz+hU1 TvwpQk00000NkvXXu0mjfh5NJY literal 0 HcmV?d00001 diff --git a/dist/img/search@2x-disabled.png b/dist/img/search@2x-disabled.png new file mode 100644 index 0000000000000000000000000000000000000000..fefe60df9631b6e7a456d8671fde045119bd8045 GIT binary patch literal 206 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkj3?z4meXamfoB=)|u4-y(|NsBry?b}_1>u!I zL8g)*zhDN2vdL#HfV?747sn8d^Jgy^axn*TxL$038sD{AlI_x&tbai|PuCfRy74aY zG+l4KV9|m&+o~CS6DQe4ZSdv`WcqZ?)53StrKv){+nqkun=Dt*p8Mu%IpeWwJ>9F` z8z|&u=5A7{?bJ&**Ijh7&4uscQ|IiED4P%QTKVt!uW`mMFpvV;&fw|l=d#Wzp$PzJ C=}W}` literal 0 HcmV?d00001 diff --git a/dist/img/search@2x.png b/dist/img/search@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..5e96a8b967a018b379a0eb79a475865a92e59ceb GIT binary patch literal 772 zcmV+f1N;1mP)qCJ4=M_RNE5_*tw8#CkPrnwqMq_Wl)fks0<(;Q-l9YZ2@(_`da*V_p@>Mc zDAWY2?SJ4594<4uvo7u#xd(o5@0q!?{AcdH=bXFYSS%J=NR}2_U}gnbK~|6zWCdA4 zR!|acaiRkwk%-r&rC>kE1FOJSFbulEgx}wZMx*m1$i-HJdT@q?m^KCOg9h+L`;^-a z-hzuBV#w0LDew-IY8F%gxJ{xR;6R+?Xjj`M`Y*HydSzq**FeTBW0rv199W&{)}=)dMg2>n zza2cCVUas2&tBnc0plvl2ewX7299&Th`-t$@Ql|-7Ei~soGLl?8eC0wrVvi_C|J}( zD>$wc`g{bvgqL6}ne|XIvTZ8b4uTutkB@QJ`3oM^SPxP3zW{cCo8Xgi{Tt{2N5n?5 zk*nLgV3U?LWZED&&#dE&nilRj#zZ`+fGKbuSQw4ezhdjn3p_z!`aAPRCa zjTRUG6(fNSj3BaV(Bl$L+POpzoFLjH%3XqSW+HJ?%VGT}ZxU17f6sw-I@OuNTx