pointsight/static/js/leaflet-search/leaflet-search.js.map
2022-03-06 18:36:36 +01:00

1 line
39 KiB
Plaintext

{"version":3,"file":"leaflet-search.js","sources":["../src/geo.js","../src/providers/nominatim.js","../src/providers/geonames.js","../src/providers/here.js","../src/providers/tomtom.js","../src/providers/kadaster.js","../node_modules/lodash.debounce/index.js","../src/index.js"],"sourcesContent":["/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\nL.geo = {\r\n Geocoder: L.Class.extend({\r\n initialize: function (map, options) {\r\n this._map = map;\r\n L.setOptions(this, options);\r\n },\r\n\r\n constructUrl(text, options = {}) {\r\n const opts = Object.assign({}, this.options, options),\r\n url = new URL(text);\r\n for (const k in opts) {\r\n url.searchParams.set(k, opts[k]);\r\n }\r\n return url;\r\n },\r\n\r\n fetchJson(url) {\r\n return fetch(url.href)\r\n .then(response => response.json())\r\n },\r\n\r\n placeMarker(latlng, bbox, place) {\r\n this._map.placeMarker(latlng, bbox, place);\r\n },\r\n\r\n fire(err) {\r\n this._map.fire(err);\r\n },\r\n\r\n suggest(address, datalist) {\r\n },\r\n\r\n lookup(id) {\r\n }\r\n })\r\n};\r\n","\r\n/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/**\r\n * @link https://nominatim.org/release-docs/develop/api/Search/\r\n */\r\nL.geo.Nominatim = L.geo.Geocoder.extend({\r\n url: 'https://nominatim.openstreetmap.org/',\r\n\r\n mark(place) {\r\n const latlng = L.latLng(place.lat, place.lon),\r\n bb = place.boundingbox,\r\n bbox = L.latLngBounds([bb[0], bb[2]], [bb[1], bb[3]]);\r\n this.placeMarker(latlng, bbox, place);\r\n },\r\n\r\n search(address) {\r\n const url = this.constructUrl(this.url + 'search', { format: 'json', q: address });\r\n return this.fetchJson(url)\r\n },\r\n\r\n suggest(address, datalist) {\r\n // const url = this.constructUrl(this.url + 'search', { format: 'json', q: address });\r\n this.search(address)\r\n .then(json => {\r\n // console.log(json);\r\n datalist.innerHTML = json.reduce((a, v) => a + `<option data-id=\"${v.osm_type.charAt(0).toUpperCase()}${v.osm_id}\">${v.display_name}</option>`, '');\r\n })\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n lookup(id) {\r\n const url = this.constructUrl(this.url + 'reverse', {\r\n format: 'json',\r\n osm_type: id.charAt(0),\r\n osm_id: id.slice(1)\r\n });\r\n this.fetchJson(url)\r\n .then(json => this.mark(json))\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n geocode(address) {\r\n // fetch('//nominatim.openstreetmap.org/search?format=json&q=' + encodeURIComponent(address))\r\n // .then(response => response.json())\r\n this.search(address)\r\n .then(json => {\r\n if (json.length < 1) throw('notfound');\r\n return json[0];\r\n })\r\n .then(place => this.mark(place))\r\n .catch(error => this.fire(error));\r\n }\r\n});\r\n","/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/**\r\n * Topological names only; no streets\r\n * @link http://www.geonames.org/export/geonames-search.html\r\n */\r\nL.geo.GeoNames = L.geo.Geocoder.extend({\r\n url: 'http://api.geonames.org/search', // no https!\r\n\r\n fetchGeonames(url) {\r\n return this.fetchJson(url)\r\n .then(json => {\r\n const geonames = json.geonames;\r\n if (! geonames || geonames.length < 1) throw 'notfound';\r\n return geonames;\r\n })\r\n },\r\n\r\n mark(place) {\r\n const latlng = L.latLng(place.lat, place.lng),\r\n bb = place.bbox,\r\n bbox = L.latLngBounds([bb.north, bb.west], [bb.south, bb.east]);\r\n this.placeMarker(latlng, bbox, place);\r\n },\r\n\r\n suggest(address, datalist) {\r\n const url = this.constructUrl(this.url, { q: address, type: 'json', style: 'short' });\r\n\r\n this.fetchGeonames(url)\r\n .then(geonames => {\r\n datalist.innerHTML = geonames.reduce((a, v) => a + `<option data-id=\"${v.geonameId}\">${v.name}&emsp;${v.countryCode}</option>`, '');\r\n })\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n lookup(id) {\r\n const url = this.constructUrl('http://api.geonames.org/getJSON', { geonameId: id });\r\n\r\n this.fetchJson(url)\r\n .then(json => this.mark(json))\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n geocode(address) {\r\n const url = this.constructUrl(this.url, { q: address, inclBbox: true });\r\n\r\n this.fetchGeonames(url)\r\n .then(geonames => geonames.shift())\r\n .then(place => this.mark(place))\r\n .catch(error => this.fire(error));\r\n }\r\n});\r\n","/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/**\r\n * @link https://developer.here.com/documentation/geocoder/dev_guide/topics/request-constructing.html\r\n */\r\nL.geo.Here = L.geo.Geocoder.extend({\r\n mark(place) {\r\n const pos = place.displayPosition,\r\n latlng = L.latLng(pos.latitude, pos.longitude),\r\n mapv = place.mapView,\r\n tl = mapv.topLeft,\r\n br = mapv.bottomRight,\r\n bbox = L.latLngBounds([tl.latitude, br.longitude], [br.latitude, tl.longitude]);\r\n this.placeMarker(latlng, bbox, place);\r\n },\r\n\r\n fetchData(options) {\r\n options.jsonattributes = 1;\r\n const url = this.constructUrl('https://geocoder.ls.hereapi.com/6.2/geocode.json', options);\r\n this.fetchJson(url)\r\n .then(json => json.response.view.shift().result.shift())\r\n .then(result => this.mark(result.location))\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n suggest(address, datalist) {\r\n const url = this.constructUrl('https://autocomplete.geocoder.ls.hereapi.com/6.2/suggest.json', { query: address });\r\n this.fetchJson(url)\r\n .then(json => json.suggestions)\r\n .then(suggestions => {\r\n datalist.innerHTML = suggestions.reduce((a, v) => a + `<option data-id=\"${v.locationId}\">${v.label}</option>`, '');\r\n })\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n lookup(id) {\r\n this.fetchData({ locationid: id });\r\n },\r\n\r\n geocode(address) {\r\n this.fetchData({ searchtext: address });\r\n }\r\n});\r\n","/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/**\r\n * @link https://developer.tomtom.com/search-api-and-extended-search-api/search-api-and-extended-search-api-documentation-geocoding/geocode\r\n */\r\nL.geo.TomTom = L.geo.Geocoder.extend({\r\n url: 'https://api.tomtom.com/search/2/geocode/',\r\n\r\n suggestions: [],\r\n\r\n datalist: null,\r\n\r\n mark(place) {\r\n const pos = place.position,\r\n latlng = L.latLng(pos.lat, pos.lon),\r\n mapv = place.viewport,\r\n tl = mapv.topLeftPoint,\r\n br = mapv.btmRightPoint,\r\n bbox = L.latLngBounds([tl.lat, br.lon], [br.lat, tl.lon]);\r\n this.placeMarker(latlng, bbox, place);\r\n },\r\n\r\n fetchResults(address, options = {}) {\r\n const query = encodeURIComponent(address),\r\n url = this.constructUrl(`${this.url}${query}.json`, options);\r\n\r\n return this.fetchJson(url)\r\n .then(json => {\r\n if (json.summary.numResults < 1) throw('notfound');\r\n return json.results;\r\n })\r\n },\r\n\r\n suggest(address, datalist) {\r\n this.datalist = datalist;\r\n this.fetchResults(address,{ typeahead: true })\r\n .then(results => {\r\n this.suggestions = results;\r\n datalist.innerHTML = results.reduce((a, v) => a + `<option data-id=\"${v.id}\">${v.address.freeformAddress}</option>`, '');\r\n })\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n lookup(id) {\r\n const found = this.suggestions.find(v => v.id === id);\r\n if (found) this.mark(found);\r\n },\r\n\r\n geocode(address) {\r\n this.fetchResults(address)\r\n .then(results => results.shift())\r\n .then(place => this.mark(place))\r\n .catch(error => this.fire(error));\r\n }\r\n});\r\n","/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/**\r\n * Netherlands\r\n * @link https://github.com/PDOK/locatieserver/wiki/API-Locatieserver\r\n */\r\nL.geo.Kadaster = L.geo.Geocoder.extend({\r\n url: 'https://geodata.nationaalgeoregister.nl/locatieserver/v3/',\r\n\r\n mark(place) {\r\n this.placeMarker(place.centroide_ll.match(/[\\d.]+/g).reverse(), null, place);\r\n },\r\n\r\n suggest(address, datalist) {\r\n const url = this.constructUrl(this.url + 'suggest', { q: address + ' and -type:postcode' });\r\n this.fetchJson(url)\r\n .then(json => {\r\n if (json.response.numFound < 1) throw('notfound');\r\n return json.highlighting;\r\n })\r\n .then(hilight => {\r\n let html = '';\r\n for (const id in hilight) {\r\n const opt = `<option data-id=\"${id}\">${hilight[id].suggest.shift()}</option>`;\r\n html += opt;\r\n }\r\n datalist.innerHTML = html;\r\n })\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n lookup(id) {\r\n const url = this.constructUrl(this.url + 'lookup', { id: id });\r\n this.fetchJson(url)\r\n .then(json => json.response.docs.shift())\r\n .then(place => this.mark(place))\r\n .catch(error => this.fire(error));\r\n },\r\n\r\n geocode(address) {\r\n const url = this.constructUrl(this.url + 'free', { q: address + ' and -type:postcode' });\r\n this.fetchJson(url)\r\n .then(json => {\r\n if (json.response.numFound < 1) throw('notfound');\r\n return json.response.docs.shift();\r\n })\r\n .then(place => this.mark(place))\r\n .catch(error => this.fire(error));\r\n }\r\n});\r\n","/**\n * lodash (Custom Build) <https://lodash.com/>\n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors <https://jquery.org/>\n * Released under MIT license <https://lodash.com/license>\n * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>\n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n","/**\r\n * sjaakp/leaflet-search\r\n * ----------\r\n * Search Control for Leaflet\r\n * Version 1.0.0\r\n * Copyright (c) 2020\r\n * Sjaak Priester, Amsterdam\r\n * MIT License\r\n * https://github.com/sjaakp/leaflet-search\r\n * https://sjaakpriester.nl\r\n */\r\n\r\n/*\r\n * L.Map acquires two extra options:\r\n * - createMarker: function to create new marker after geofound. If not set: L.marker.\r\n * - fly: bool, whether fly animation is used to move to found location.\r\n *\r\n * One extra property:\r\n * - marker: if set, Search moves this marker to the found location, otherwise (default) creates new marker.\r\n *\r\n * Two extra methods:\r\n * - addGeocoder(name, options?): add geocoder to map, with name and options.\r\n * - geocode(address): try to find address and place marker there.\r\n *\r\n * Two extra events:\r\n * - 'geofound': data = { latlng: <latlng>, bbox: <boundingBox>, place: <all data from geocoder> }\r\n * - 'notfound': no result from geocoder\r\n */\r\n\r\nimport './geo.scss';\r\n\r\nimport './geo.js';\r\nimport './providers/nominatim.js';\r\nimport './providers/geonames.js';\r\nimport './providers/here.js';\r\nimport './providers/tomtom.js';\r\nimport './providers/kadaster.js';\r\n\r\nimport debounce from 'lodash.debounce';\r\n\r\nL.Control.Search = L.Control.extend({\r\n initialize(options) {\r\n L.setOptions(this, L.extend({\r\n debounce: 300,\r\n suggest: 2\r\n }, options));\r\n },\r\n\r\n onAdd(map) {\r\n const datalistId = map.getContainer().id + '_dl';\r\n const container = L.DomUtil.create('div', 'geo-search');\r\n const input = L.DomUtil.create('input', null, container);\r\n input.type = 'text';\r\n input.id = map.getContainer().id + '_in';\r\n input.setAttribute('list', datalistId);\r\n L.DomEvent.on(input, 'input', debounce(function(e) {\r\n const v = e.target.value;\r\n if (v.length >= this.options.suggest) {\r\n map._geocoder.suggest(e.target.value, datalist);\r\n }\r\n }, this.options.debounce), this);\r\n L.DomEvent.on(input, 'change', function (e) {\r\n const val = e.target.value,\r\n opts = datalist.childNodes;\r\n e.target.value = '';\r\n container.classList.remove('open');\r\n for (let i = 0; i < opts.length; i++) {\r\n if (val.startsWith(opts[i].innerText)) {\r\n this._geocoder.lookup(opts[i].dataset.id);\r\n return;\r\n }\r\n }\r\n this.geocode(val);\r\n }, map);\r\n /*const button = L.DomUtil.create('button', null, container);\r\n button.innerHTML = '<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\"><path d=\"M505 442.7L405.3 343c-4.5-4.5-10.6-7-17-7H372c27.6-35.3 44-79.7 44-128C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c48.3 0 92.7-16.4 128-44v16.3c0 6.4 2.5 12.5 7 17l99.7 99.7c9.4 9.4 24.6 9.4 33.9 0l28.3-28.3c9.4-9.4 9.4-24.6.1-34zM208 336c-70.7 0-128-57.2-128-128 0-70.7 57.2-128 128-128 70.7 0 128 57.2 128 128 0 70.7-57.2 128-128 128z\"/></svg>';\r\n button.title = 'Search';\r\n L.DomEvent.on(button, 'click', function(e) {\r\n e.preventDefault();\r\n e.stopPropagation();\r\n this.toggle();\r\n }, this);*/\r\n const datalist = L.DomUtil.create('datalist', null, container);\r\n datalist.id = datalistId;\r\n return container;\r\n },\r\n\r\n toggle() {\r\n const c = this.getContainer(),\r\n cc = c.classList,\r\n bOpen = cc.contains('open');\r\n cc.toggle('open');\r\n if (! bOpen) {\r\n c.children[0].focus();\r\n }\r\n },\r\n});\r\n\r\nL.control.search = function(options) {\r\n return new L.Control.Search(options);\r\n};\r\n\r\nL.Map.include({\r\n marker: null,\r\n\r\n placeMarker(latlng, bbox, place) {\r\n this.fire('geofound', { latlng: latlng, bbox: bbox, place: place });\r\n if (this.marker) {\r\n this.marker.setLatLng(latlng);\r\n }\r\n else {\r\n const createMarker = this.options.createMarker || L.marker;\r\n this.marker = createMarker(latlng).addTo(this);\r\n }\r\n if (this.options.fly) {\r\n if (bbox) this.flyToBounds(bbox);\r\n else this.flyTo(latlng);\r\n } else {\r\n if (bbox) this.fitBounds(bbox);\r\n else this.panTo(latlng);\r\n }\r\n },\r\n\r\n geocode(address) {\r\n this._geocoder.geocode(address);\r\n return this;\r\n },\r\n\r\n setGeocoder(name, options = {}) {\r\n this._geocoder = new L.geo[name](this, options);\r\n return this;\r\n },\r\n});\r\n\r\nL.Map.addInitHook(function() {\r\n this.setGeocoder('Nominatim', {});\r\n});\r\n"],"names":["L","geo","Geocoder","Class","extend","initialize","map","options","this","_map","setOptions","constructUrl","text","const","opts","Object","assign","url","URL","k","searchParams","set","fetchJson","fetch","href","then","response","json","placeMarker","latlng","bbox","place","fire","err","suggest","address","datalist","lookup","id","Nominatim","mark","latLng","lat","lon","bb","boundingbox","latLngBounds","search","format","q","innerHTML","reduce","a","v","osm_type","charAt","toUpperCase","catch","error","osm_id","slice","geocode","length","GeoNames","fetchGeonames","geonames","lng","north","west","south","east","type","style","geonameId","inclBbox","shift","Here","pos","displayPosition","latitude","longitude","mapv","mapView","tl","topLeft","br","bottomRight","fetchData","jsonattributes","view","result","location","query","suggestions","locationid","searchtext","TomTom","position","viewport","topLeftPoint","btmRightPoint","fetchResults","encodeURIComponent","summary","numResults","results","typeahead","found","find","Kadaster","centroide_ll","match","reverse","numFound","highlighting","hilight","let","html","docs","reTrim","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","parseInt","freeGlobal","global","freeSelf","self","root","Function","objectToString","prototype","toString","nativeMax","Math","max","nativeMin","min","now","Date","isObject","value","toNumber","isObjectLike","call","isSymbol","other","valueOf","replace","isBinary","test","func","wait","lastArgs","lastThis","maxWait","timerId","lastCallTime","lastInvokeTime","leading","maxing","trailing","TypeError","invokeFunc","time","args","thisArg","undefined","apply","leadingEdge","setTimeout","timerExpired","shouldInvoke","timeSinceLastCall","trailingEdge","remainingWait","debounced","isInvoking","arguments","cancel","clearTimeout","flush","Control","Search","debounce","onAdd","datalistId","getContainer","container","DomUtil","create","input","setAttribute","DomEvent","on","e","target","_geocoder","val","childNodes","classList","remove","i","startsWith","innerText","dataset","toggle","c","cc","bOpen","contains","children","focus","control","Map","include","marker","setLatLng","createMarker","addTo","fly","flyToBounds","flyTo","fitBounds","panTo","setGeocoder","name","addInitHook"],"mappings":";;;;;;;o6BAYAA,EAAEC,IAAM,CACJC,SAAUF,EAAEG,MAAMC,OAAO,CACrBC,WAAY,SAAUC,EAAKC,GACvBC,KAAKC,KAAOH,EACZN,EAAEU,WAAWF,KAAMD,IAGvBI,sBAAaC,EAAML,kBAAU,IACzBM,IAAMC,EAAOC,OAAOC,OAAO,GAAIR,KAAKD,QAASA,GACzCU,EAAM,IAAIC,IAAIN,GAClB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