From 1b7c079a98063f7df66ca88cd80a94944fb6be40 Mon Sep 17 00:00:00 2001 From: Dominique Cavailhez Date: Tue, 5 Sep 2023 21:07:53 +0200 Subject: [PATCH] Last cosmetics before v4.3.0 --- .eslintrc.cjs | 30 +++ README.md | 43 +++- build/banner.js | 4 +- dist/ol-geocoder-debug.js | 170 +++++++------- dist/ol-geocoder-debug.js.map | 2 +- dist/ol-geocoder.css | 8 +- dist/ol-geocoder.js | 6 +- dist/ol-geocoder.js.map | 2 +- dist/ol-geocoder.min.css | 8 +- examples/control-glass.html | 2 +- examples/custom-provider.html | 2 +- examples/index.html | 2 +- konstants/index.js | 3 + package-lock.json | 418 +++++++++++++++++----------------- package.json | 7 +- src/nominatim.js | 31 +-- src/providers/bing.js | 2 +- src/providers/mapquest.js | 2 +- src/providers/opencage.js | 2 +- src/providers/osm.js | 2 +- src/providers/photon.js | 2 +- 21 files changed, 397 insertions(+), 351 deletions(-) create mode 100644 .eslintrc.cjs diff --git a/.eslintrc.cjs b/.eslintrc.cjs new file mode 100644 index 0000000..0a4ff49 --- /dev/null +++ b/.eslintrc.cjs @@ -0,0 +1,30 @@ +module.exports = { + "env": { + "browser": true, + "es2021": true + }, + "extends": "eslint:recommended", + "overrides": [ + { + "env": { + "node": true + }, + "files": [ + ".eslintrc.{js,cjs}" + ], + "parserOptions": { + "sourceType": "script" + } + } + ], + "parserOptions": { + "ecmaVersion": "latest", + "sourceType": "module" + }, + "rules": { + }, + "globals": { + "ol": "readonly", + "Geocoder": "readonly" + } +} diff --git a/README.md b/README.md index d75c497..d73bd14 100644 --- a/README.md +++ b/README.md @@ -7,20 +7,21 @@ I would like to thank them and the entire development team for the fantastic wor # OpenLayers Control Geocoder

- npm version + npm version - license + license

-A geocoder extension compatible with OpenLayers v7. **Requires** OpenLayers **v6.15.0** or higher. +A geocoder extension compatible with OpenLayers v7 & v8 (Tested with all versions from v6.15.1 to v8.0.0). ![geocoder anim](https://raw.githubusercontent.com/Dominique92/ol-geocoder/screenshots/images/anim.gif) + ## Demo -You can see [here a demo](http://rawgit.com/jonataswalker/ol-geocoder/master/examples/control-nominatim.html) or on [jsFiddle](http://jsfiddle.net/jonataswalker/c4qv9afb/) if you prefer. There is also a [demo of creating a custom provider](http://rawgit.com/jonataswalker/ol-geocoder/master/examples/custom-provider.html) +You can see [here a demo](http://dominique92.github.io/ol-geocoder/examples/control-nominatim.html) +or on [jsFiddle](http://jsfiddle.net/Dominique92/c4qv9afb/) if you prefer. +There is also a [demo of creating a custom provider](http://dominique92.github.io/ol-geocoder/examples/custom-provider.html) ## Providers The plugin supports (for now) the following providers: @@ -39,35 +40,53 @@ For an example of defining and using a custom provider see [`examples/custom-pro Custom providers must implement the following methods: #### `getParameters(options)` - * `options` `{Object}` * `query` Search string entered by the user; * `lang` `{string}` Preferable language; * `limit` `{number}` Limit of results; #### `handleResponse(results)` - * `results` `{Object}` Parsed JSON response from API call -## How to use it? - +## What's new in 4.3.0 ? +* search form outside map [#87](https://github.com/Dominique92/ol-geocoder/issues/87) +* Geocoder does not zoom to the location correctly [#228](https://github.com/Dominique92/ol-geocoder/issues/228) +* ol-geocoder results are too much zoomed -in [#235](https://github.com/Dominique92/ol-geocoder/issues/235) +* Toggle Marker in Options [#239](https://github.com/Dominique92/ol-geocoder/issues/239) +* Using Search Function Outside Div [#247](https://github.com/Dominique92/ol-geocoder/issues/247) +* Search Button - search does not work from smartphone if there is another text field [#255](https://github.com/Dominique92/ol-geocoder/issues/255) +* Remove search layer from legend [#256](https://github.com/Dominique92/ol-geocoder/issues/256) +* Limit search result to extent [#260](https://github.com/Dominique92/ol-geocoder/issues/260) +* Allow custom URL for osm provider [#266](https://github.com/Dominique92/ol-geocoder/issues/266) +* Init error on 4.2.0 [#270](https://github.com/Dominique92/ol-geocoder/issues/270) +* src/nominating.js better import on 4.2.0 [#271](https://github.com/Dominique92/ol-geocoder/issues/271) +* Error on bbox returned by nominatim.js 4.2.0 on Openlayers 7.4.0+ [#272](https://github.com/Dominique92/ol-geocoder/issues/272) +* fix(examples): map height and width were 0px for custom provider [#276](https://github.com/Dominique92/ol-geocoder/issues/276) + ##### NPM `npm install ol-geocoder` -##### CDN Hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-geocoder) +##### CDN hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-geocoder) Load CSS and Javascript: ```HTML ``` -##### CDN Hosted - UNPKG +##### CDN hosted - unpkg Load CSS and Javascript: ```HTML ``` +##### Github pages hosted +Load CSS and Javascript: +```HTML + + +``` + ##### Self hosted Download [latest release](https://github.com/Dominique92/ol-geocoder/releases/latest) and (obviously) load CSS and Javascript. diff --git a/build/banner.js b/build/banner.js index 7433158..73d3fe9 100644 --- a/build/banner.js +++ b/build/banner.js @@ -3,4 +3,6 @@ * {description} * {homepage} * Built: {time} - */ \ No newline at end of file + */ + + \ No newline at end of file diff --git a/dist/ol-geocoder-debug.js b/dist/ol-geocoder-debug.js index 4c57d5c..831b2ee 100644 --- a/dist/ol-geocoder-debug.js +++ b/dist/ol-geocoder-debug.js @@ -1,9 +1,11 @@ /*! - * ol-geocoder - v4.2.1 + * ol-geocoder - v4.3.0 * A geocoder extension compatible with OpenLayers v7+ & v8+ * https://github.com/Dominique92/ol-geocoder - * Built: Mon Sep 04 2023 16:09:28 GMT+0200 (heure d’été d’Europe centrale) + * Built: Tue Sep 05 2023 21:03:55 GMT+0200 (heure d’été d’Europe centrale) */ + + (function (global, factory) { typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/control/Control'), require('ol/style/Style'), require('ol/style/Icon'), require('ol/layer/Vector'), require('ol/source/Vector'), require('ol/geom/Point'), require('ol/Feature'), require('ol/proj')) : typeof define === 'function' && define.amd ? define(['ol/control/Control', 'ol/style/Style', 'ol/style/Icon', 'ol/layer/Vector', 'ol/source/Vector', 'ol/geom/Point', 'ol/Feature', 'ol/proj'], factory) : @@ -123,6 +125,9 @@ limit: 5, keepOpen: false, preventDefault: false, + preventPanning: false, + preventMarker: false, + defaultFlyResolution: 10, // Meters per pixel debug: false, }; @@ -419,6 +424,83 @@ `; + function json(obj) { + return new Promise((resolve, reject) => { + const url = encodeUrlXhr(obj.url, obj.data); + const config = { + method: 'GET', + mode: 'cors', + credentials: 'same-origin', + }; + + if (obj.jsonp) { + jsonp(url, obj.callbackName, resolve); + } else { + fetch(url, config) + .then((r) => r.json()) + .then(resolve) + .catch(reject); + } + }); + } + + function toQueryString(obj) { + return Object.keys(obj) + .reduce((acc, k) => { + acc.push( + typeof obj[k] === 'object' ? + toQueryString(obj[k]) : + `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}` + ); + + return acc; + }, []) + .join('&'); + } + + function encodeUrlXhr(url, data) { + if (data && typeof data === 'object') { + url += (/\?/u.test(url) ? '&' : '?') + toQueryString(data); + } + + return url; + } + + function jsonp(url, key, callback) { + // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js + const { + head + } = document; + const script = document.createElement('script'); + // generate minimally unique name for callback function + const callbackName = `f${Math.round(Math.random() * Date.now())}`; + + // set request url + script.setAttribute( + 'src', + // add callback parameter to the url + // where key is the parameter key supplied + // and callbackName is the parameter value + `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}` + ); + + // place jsonp callback on window, + // the script sent by the server should call this + // function as it was passed as a url parameter + window[callbackName] = (data) => { + window[callbackName] = undefined; + + // clean up script tag created for request + setTimeout(() => head.removeChild(script), 0); + + // hand data back to the user + callback(data); + }; + + // actually make the request + head.append(script); + } + /** * @class Photon */ @@ -727,83 +809,6 @@ } } - function json(obj) { - return new Promise((resolve, reject) => { - const url = encodeUrlXhr(obj.url, obj.data); - const config = { - method: 'GET', - mode: 'cors', - credentials: 'same-origin', - }; - - if (obj.jsonp) { - jsonp(url, obj.callbackName, resolve); - } else { - fetch(url, config) - .then((r) => r.json()) - .then(resolve) - .catch(reject); - } - }); - } - - function toQueryString(obj) { - return Object.keys(obj) - .reduce((acc, k) => { - acc.push( - typeof obj[k] === 'object' ? - toQueryString(obj[k]) : - `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}` - ); - - return acc; - }, []) - .join('&'); - } - - function encodeUrlXhr(url, data) { - if (data && typeof data === 'object') { - url += (/\?/u.test(url) ? '&' : '?') + toQueryString(data); - } - - return url; - } - - function jsonp(url, key, callback) { - // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js - const { - head - } = document; - const script = document.createElement('script'); - // generate minimally unique name for callback function - const callbackName = `f${Math.round(Math.random() * Date.now())}`; - - // set request url - script.setAttribute( - 'src', - // add callback parameter to the url - // where key is the parameter key supplied - // and callbackName is the parameter value - `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}` - ); - - // place jsonp callback on window, - // the script sent by the server should call this - // function as it was passed as a url parameter - window[callbackName] = (data) => { - window[callbackName] = undefined; - - // clean up script tag created for request - setTimeout(() => head.removeChild(script), 0); - - // hand data back to the user - callback(data); - }; - - // actually make the request - head.append(script); - } - const klasses = VARS.cssClasses; /** @@ -837,16 +842,14 @@ this.lastQuery = ''; this.container = this.els.container; this.registeredListeners = { - mapClick: false + mapClick: false, }; this.setListeners(); } setListeners() { - const openSearch = (evt) => { evt.stopPropagation(); - hasClass(this.els.control, klasses.glass.expanded) ? this.collapse() : this.expand(); }; const query = (evt) => { @@ -867,7 +870,6 @@ const stopBubbling = (evt) => evt.stopPropagation(); const search = () => { this.els.input.focus(); - addClass(this.els.search, klasses.hidden); this.query(this.els.input.value); }; const handleValue = (evt) => { @@ -1036,7 +1038,7 @@ map.getView().animate({ center: coord, // ol-geocoder results are too much zoomed -in Dominique92/ol-geocoder#235 - resolution: this.options.defaultFlyResolution || 10, // Meters per pixel + resolution: this.options.defaultFlyResolution, duration: 500, }); } diff --git a/dist/ol-geocoder-debug.js.map b/dist/ol-geocoder-debug.js.map index e62954e..3bc1644 100644 --- a/dist/ol-geocoder-debug.js.map +++ b/dist/ol-geocoder-debug.js.map @@ -1 +1 @@ -{"version":3,"file":"ol-geocoder-debug.js","sources":["../konstants/index.js","../src/helpers/mix.js","../src/helpers/dom.js","../src/html.js","../src/providers/photon.js","../src/providers/osm.js","../src/providers/mapquest.js","../src/providers/bing.js","../src/providers/opencage.js","../src/helpers/ajax.js","../src/nominatim.js","../src/base.js"],"sourcesContent":["import * as _VARS_ from './vars.json';\n\nexport const VARS = _VARS_;\n\nexport const EVENT_TYPE = {\n ADDRESSCHOSEN: 'addresschosen',\n};\n\nexport const CONTROL_TYPE = {\n NOMINATIM: 'nominatim',\n REVERSE: 'reverse',\n};\n\nexport const TARGET_TYPE = {\n GLASS: 'glass-button',\n INPUT: 'text-input',\n};\n\nexport const FEATURE_SRC = '//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png';\n\nexport const PROVIDERS = {\n OSM: 'osm',\n MAPQUEST: 'mapquest',\n PHOTON: 'photon',\n BING: 'bing',\n OPENCAGE: 'opencage',\n};\n\nexport const DEFAULT_OPTIONS = {\n provider: PROVIDERS.OSM,\n placeholder: 'Search for an address',\n featureStyle: null,\n targetType: TARGET_TYPE.GLASS,\n lang: 'en-US',\n limit: 5,\n keepOpen: false,\n preventDefault: false,\n debug: false,\n};","/**\n * Overwrites obj1's values with obj2's and adds\n * obj2's if non existent in obj1\n * @returns obj3 a new object based on obj1 and obj2\n */\nexport function mergeOptions(obj1, obj2) {\n const obj3 = {};\n\n Object.keys(obj1).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj1, key)) {\n obj3[key] = obj1[key];\n }\n });\n\n Object.keys(obj2).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n obj3[key] = obj2[key];\n }\n });\n\n return obj3;\n}\n\nexport function assert(condition, message = 'Assertion failed') {\n if (!condition) {\n if (typeof Error !== 'undefined') throw new Error(message);\n\n throw message; // Fallback\n }\n}\n\nexport function now() {\n // Polyfill for window.performance.now()\n // @license http://opensource.org/licenses/MIT\n // copyright Paul Irish 2015\n // https://gist.github.com/paulirish/5438650\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n let nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = () => Date.now() - nowOffset;\n }\n\n return window.performance.now();\n}\n\nexport function flyTo(map, coord, duration = 500, resolution = 2.388657133911758) {\n map.getView().animate({\n center: coord,\n resolution: resolution,\n duration: duration,\n });\n}\n\nexport function randomId(prefix) {\n const id = now().toString(36);\n\n return prefix ? prefix + id : id;\n}\n\nexport function isNumeric(str) {\n return /^\\d+$/u.test(str);\n}\n\nexport function isEmpty(str) {\n return !str || str.length === 0;\n}\n\nexport function emptyArray(array) {\n while (array.length) array.pop();\n}\n\nexport function anyMatchInArray(source, target) {\n return source.some((each) => target.includes(each));\n}\n\nexport function everyMatchInArray(arr1, arr2) {\n return arr2.every((each) => arr1.includes(each));\n}\n\nexport function anyItemHasValue(obj, has = false) {\n const keys = Object.keys(obj);\n\n keys.forEach((key) => {\n if (!isEmpty(obj[key])) has = true;\n });\n\n return has;\n}","/* eslint-disable prefer-named-capture-group */\nimport {\n isNumeric\n} from './mix';\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to remove a class.\n */\nexport function addClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => addClass(each, classname));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (!hasClass(element, array[i])) {\n _addClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to add a class.\n */\nexport function removeClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => removeClass(each, classname, timeout));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (hasClass(element, array[i])) {\n _removeClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element} element DOM node.\n * @param {String} classname Classname.\n * @return {Boolean}\n */\nexport function hasClass(element, c) {\n // use native if available\n return element.classList ? element.classList.contains(c) : classRegex(c).test(element.className);\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String} classname Classe.\n */\nexport function toggleClass(element, classname) {\n if (Array.isArray(element)) {\n element.forEach((each) => toggleClass(each, classname));\n\n return;\n }\n\n // use native if available\n if (element.classList) {\n element.classList.toggle(classname);\n } else {\n hasClass(element, classname) ? _removeClass(element, classname) : _addClass(element, classname);\n }\n}\n\n/**\n * Abstraction to querySelectorAll for increased\n * performance and greater usability\n * @param {String} selector\n * @param {Element} context (optional)\n * @param {Boolean} findAll (optional)\n * @return (findAll) {Element} : {Array}\n */\nexport function $(id) {\n id = id[0] === '#' ? id.slice(1, 1 + id.length) : id;\n\n return document.getElementById(id);\n}\n\nexport function isElement(obj) {\n // DOM, Level2\n if ('HTMLElement' in window) {\n return !!obj && obj instanceof HTMLElement;\n }\n\n // Older browsers\n return !!obj && typeof obj === 'object' && obj.nodeType === 1 && !!obj.nodeName;\n}\n\nexport function getAllChildren(node, tag) {\n return [].slice.call(node.getElementsByTagName(tag));\n}\n\nexport function removeAllChildren(node) {\n while (node.firstChild) node.firstChild.remove();\n}\n\nexport function removeAll(collection) {\n let node;\n\n while ((node = collection[0])) node.remove();\n}\n\nexport function getChildren(node, tag) {\n return [].filter.call(node.childNodes, (el) =>\n tag ? el.nodeType === 1 && el.tagName.toLowerCase() === tag : el.nodeType === 1\n );\n}\n\nexport function template(html, row) {\n return html.replace(/\\{\\s*([\\w-]+)\\s*\\}/gu, (htm, key) => {\n const value = row[key] === undefined ? '' : row[key];\n\n return htmlEscape(value);\n });\n}\n\nexport function htmlEscape(str) {\n return String(str)\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n}\n\nexport function createElement(node, html) {\n let elem;\n\n if (Array.isArray(node)) {\n elem = document.createElement(node[0]);\n\n if (node[1].id) elem.id = node[1].id;\n\n if (node[1].classname) elem.className = node[1].classname;\n\n if (node[1].attr) {\n const {\n attr\n } = node[1];\n\n if (Array.isArray(attr)) {\n let i = -1;\n\n while (++i < attr.length) {\n elem.setAttribute(attr[i].name, attr[i].value);\n }\n } else {\n elem.setAttribute(attr.name, attr.value);\n }\n }\n } else {\n elem = document.createElement(node);\n }\n\n elem.innerHTML = html;\n\n const frag = document.createDocumentFragment();\n\n while (elem.childNodes[0]) frag.append(elem.childNodes[0]);\n\n elem.append(frag);\n\n return elem;\n}\n\nfunction classRegex(classname) {\n return new RegExp(`(^|\\\\s+) ${classname} (\\\\s+|$)`, 'u');\n}\n\nfunction _addClass(el, klass, timeout) {\n // use native if available\n if (el.classList) {\n el.classList.add(klass);\n } else {\n el.className = `${el.className} ${klass}`.trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _removeClass(el, klass), timeout);\n }\n}\n\nfunction _removeClass(el, klass, timeout) {\n if (el.classList) {\n el.classList.remove(klass);\n } else {\n el.className = el.className.replace(classRegex(klass), ' ').trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _addClass(el, klass), timeout);\n }\n}","import {\n VARS,\n TARGET_TYPE\n} from '../konstants';\n\nimport {\n createElement\n} from './helpers/dom';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Html\n */\nexport class Html {\n /**\n * @constructor\n * @param {object} options Options.\n */\n constructor(options) {\n this.options = options;\n this.els = this.createControl();\n }\n\n createControl() {\n let container;\n let containerClass;\n let elements;\n\n if (this.options.targetType === TARGET_TYPE.INPUT) {\n containerClass = `${klasses.namespace} ${klasses.inputText.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.input\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.inputText.control}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n } else {\n containerClass = `${klasses.namespace} ${klasses.glass.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.glass\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.glass.control}`),\n button: container.querySelector(`.${klasses.glass.button}`),\n input: container.querySelector(`.${klasses.glass.input}`),\n search: container.querySelector(`.${klasses.glass.search}`),\n result: container.querySelector(`.${klasses.glass.result}`),\n };\n }\n\n // set placeholder from options\n elements.input.placeholder = this.options.placeholder;\n\n return elements;\n }\n}\n\nHtml.glass = `\n
\n \n \n \n
\n
    \n`;\n\nHtml.input = `\n
    \n \n \n \n
    \n
      \n`;","/**\n * @class Photon\n */\nexport class Photon {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://photon.komoot.io/api/',\n\n params: {\n q: '',\n limit: 10,\n lang: 'en',\n },\n\n langs: ['de', 'it', 'fr', 'en'],\n };\n }\n\n getParameters(options) {\n options.lang = options.lang.toLowerCase();\n\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n limit: options.limit || this.settings.params.limit,\n\n lang: this.settings.langs.includes(options.lang) ? options.lang : this.settings.params.lang,\n },\n };\n }\n\n handleResponse(results) {\n if (results.features.length === 0) return [];\n\n return results.features.map((result) => ({\n lon: result.geometry.coordinates[0],\n lat: result.geometry.coordinates[1],\n\n address: {\n name: result.properties.name,\n postcode: result.properties.postcode,\n city: result.properties.city,\n state: result.properties.state,\n country: result.properties.country,\n },\n\n original: {\n formatted: result.properties.name,\n details: result.properties,\n },\n }));\n }\n}","/**\n * @class OpenStreet\n */\nexport class OpenStreet {\n /**\n * @constructor\n */\n constructor(options) {\n this.settings = {\n url: 'https://nominatim.openstreetmap.org/search',\n ...options, // Allow custom URL for osm provider https://github.com/Dominique92/ol-geocoder/issues/266\n\n params: {\n q: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n viewbox: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(opt) {\n return {\n url: this.settings.url,\n\n params: {\n q: opt.query,\n format: this.settings.params.format,\n addressdetails: this.settings.params.addressdetails,\n limit: opt.limit || this.settings.params.limit,\n countrycodes: opt.countrycodes || this.settings.params.countrycodes,\n viewbox: opt.viewbox || this.settings.params.viewbox,\n 'accept-language': opt.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n bbox: result.boundingbox,\n\n address: {\n name: result.display_name,\n road: result.address.road || '',\n houseNumber: result.address.house_number || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class MapQuest\n */\nexport class MapQuest {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://open.mapquestapi.com/nominatim/v1/search.php',\n\n params: {\n q: '',\n key: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n format: 'json',\n addressdetails: 1,\n limit: options.limit || this.settings.params.limit,\n countrycodes: options.countrycodes || this.settings.params.countrycodes,\n\n 'accept-language': options.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n\n address: {\n name: result.address.neighbourhood || '',\n road: result.address.road || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class Bing\n */\nexport class Bing {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://dev.virtualearth.net/REST/v1/Locations',\n callbackName: 'jsonp',\n\n params: {\n query: '',\n key: '',\n includeNeighborhood: 0,\n maxResults: 10,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n callbackName: this.settings.callbackName,\n\n params: {\n query: options.query,\n key: options.key,\n\n includeNeighborhood: options.includeNeighborhood || this.settings.params.includeNeighborhood,\n\n maxResults: options.maxResults || this.settings.params.maxResults,\n },\n };\n }\n\n handleResponse(results) {\n const {\n resources\n } = results.resourceSets[0];\n\n if (resources.length === 0) return [];\n\n return resources.map((result) => ({\n lon: result.point.coordinates[1],\n lat: result.point.coordinates[0],\n\n address: {\n name: result.name,\n },\n\n original: {\n formatted: result.address.formattedAddress,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class OpenCage\n */\nexport class OpenCage {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://api.opencagedata.com/geocode/v1/json?',\n\n params: {\n q: '',\n key: '',\n limit: 10,\n countrycode: '',\n pretty: 1,\n no_annotations: 1,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n limit: options.limit || this.settings.params.limit,\n countrycode: options.countrycodes || this.settings.params.countrycodes,\n },\n };\n }\n\n handleResponse(results) {\n if (results.results.length === 0) return [];\n\n return results.results.map((result) => ({\n lon: result.geometry.lng,\n lat: result.geometry.lat,\n\n address: {\n name: result.components.house_number || '',\n road: result.components.road || '',\n postcode: result.components.postcode,\n city: result.components.city || result.components.town,\n state: result.components.state,\n country: result.components.country,\n },\n\n original: {\n formatted: result.formatted,\n details: result.components,\n },\n }));\n }\n}","export function json(obj) {\n return new Promise((resolve, reject) => {\n const url = encodeUrlXhr(obj.url, obj.data);\n const config = {\n method: 'GET',\n mode: 'cors',\n credentials: 'same-origin',\n };\n\n if (obj.jsonp) {\n jsonp(url, obj.callbackName, resolve);\n } else {\n fetch(url, config)\n .then((r) => r.json())\n .then(resolve)\n .catch(reject);\n }\n });\n}\n\nfunction toQueryString(obj) {\n return Object.keys(obj)\n .reduce((acc, k) => {\n acc.push(\n typeof obj[k] === 'object' ?\n toQueryString(obj[k]) :\n `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`\n );\n\n return acc;\n }, [])\n .join('&');\n}\n\nfunction encodeUrlXhr(url, data) {\n if (data && typeof data === 'object') {\n url += (/\\?/u.test(url) ? '&' : '?') + toQueryString(data);\n }\n\n return url;\n}\n\nfunction jsonp(url, key, callback) {\n // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js\n const {\n head\n } = document;\n const script = document.createElement('script');\n // generate minimally unique name for callback function\n const callbackName = `f${Math.round(Math.random() * Date.now())}`;\n\n // set request url\n script.setAttribute(\n 'src',\n // add callback parameter to the url\n // where key is the parameter key supplied\n // and callbackName is the parameter value\n `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}`\n );\n\n // place jsonp callback on window,\n // the script sent by the server should call this\n // function as it was passed as a url parameter\n window[callbackName] = (data) => {\n window[callbackName] = undefined;\n\n // clean up script tag created for request\n setTimeout(() => head.removeChild(script), 0);\n\n // hand data back to the user\n callback(data);\n };\n\n // actually make the request\n head.append(script);\n}","import LayerVector from 'ol/layer/Vector';\nimport SourceVector from 'ol/source/Vector';\nimport Point from 'ol/geom/Point';\nimport Feature from 'ol/Feature';\nimport * as proj from 'ol/proj';\n\nimport {\n VARS,\n TARGET_TYPE,\n PROVIDERS,\n EVENT_TYPE\n} from '../konstants';\n\nimport {\n hasClass,\n addClass,\n removeClass,\n createElement,\n template,\n removeAllChildren,\n} from './helpers/dom';\nimport {\n Photon\n} from './providers/photon';\nimport {\n OpenStreet\n} from './providers/osm';\nimport {\n MapQuest\n} from './providers/mapquest';\nimport {\n Bing\n} from './providers/bing';\nimport {\n OpenCage\n} from './providers/opencage';\nimport {\n randomId\n} from './helpers/mix';\nimport {\n json\n} from './helpers/ajax';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Nominatim\n */\nexport class Nominatim {\n /**\n * @constructor\n * @param {Function} base Base class.\n */\n constructor(base, els) {\n this.Base = base;\n\n this.layerName = randomId('geocoder-layer-');\n this.layer = new LayerVector({\n name: this.layerName,\n source: new SourceVector(),\n displayInLayerSwitcher: false, // Remove search layer from legend https://github.com/Dominique92/ol-geocoder/issues/256\n });\n\n this.options = base.options;\n // provider is either the name of a built-in provider as a string or an\n // object that implements the provider API\n this.options.provider =\n typeof this.options.provider === 'string' ?\n this.options.provider.toLowerCase() :\n this.options.provider;\n this.provider = this.newProvider();\n\n this.els = els;\n this.lastQuery = '';\n this.container = this.els.container;\n this.registeredListeners = {\n mapClick: false\n };\n this.setListeners();\n }\n\n setListeners() {\n let timeout;\n let lastQuery;\n\n const openSearch = (evt) => {\n evt.stopPropagation();\n\n hasClass(this.els.control, klasses.glass.expanded) ? this.collapse() : this.expand();\n };\n const query = (evt) => {\n const value = evt.target.value.trim();\n const hit = evt.key ?\n evt.key === 'Enter' :\n evt.which ?\n evt.which === 13 :\n evt.keyCode ?\n evt.keyCode === 13 :\n false;\n\n if (hit) {\n evt.preventDefault();\n this.query(value);\n }\n };\n const stopBubbling = (evt) => evt.stopPropagation();\n const search = () => {\n this.els.input.focus();\n addClass(this.els.search, klasses.hidden);\n this.query(this.els.input.value);\n };\n const handleValue = (evt) => {\n const value = evt.target.value.trim();\n\n value.length !== 0 ?\n removeClass(this.els.search, klasses.hidden) :\n addClass(this.els.search, klasses.hidden);\n };\n\n this.els.input.addEventListener('keypress', query, false);\n this.els.input.addEventListener('click', stopBubbling, false);\n this.els.input.addEventListener('input', handleValue, false);\n this.els.search.addEventListener('click', search, false);\n\n if (this.options.targetType === TARGET_TYPE.GLASS) {\n this.els.button.addEventListener('click', openSearch, false);\n }\n }\n\n query(q) {\n // lazy provider\n if (!this.provider) {\n this.provider = this.newProvider();\n }\n\n const parameters = this.provider.getParameters({\n query: q,\n key: this.options.key,\n lang: this.options.lang,\n countrycodes: this.options.countrycodes,\n viewbox: this.options.viewbox,\n limit: this.options.limit,\n });\n\n if (this.lastQuery === q && this.els.result.firstChild) return;\n\n this.lastQuery = q;\n this.clearResults();\n addClass(this.els.search, klasses.spin);\n\n const ajax = {\n url: parameters.url,\n data: parameters.params,\n };\n\n if (parameters.callbackName) {\n ajax.jsonp = true;\n ajax.callbackName = parameters.callbackName;\n }\n\n json(ajax)\n .then((res) => {\n // eslint-disable-next-line no-console\n this.options.debug && console.info(res);\n\n removeClass(this.els.search, klasses.spin);\n\n // will be fullfiled according to provider\n const res_ = this.provider.handleResponse(res);\n\n if (res_) {\n this.createList(res_);\n this.listenMapClick();\n }\n })\n .catch(() => {\n removeClass(this.els.search, klasses.spin);\n\n const li = createElement('li', '
      Error! No internet connection?
      ');\n\n this.els.result.append(li);\n });\n }\n\n createList(response) {\n const ul = this.els.result;\n\n response.forEach((row) => {\n let addressHtml;\n\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n addressHtml = `${row.address.name}`;\n\n break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n const html = `${addressHtml}`;\n const li = createElement('li', html);\n\n li.addEventListener(\n 'click',\n (evt) => {\n evt.preventDefault();\n this.chosen(row, addressHtml, row.address, row.original);\n },\n false\n );\n\n ul.append(li);\n });\n }\n\n chosen(place, addressHtml, addressObj, addressOriginal) {\n const map = this.Base.getMap();\n const coord_ = [Number.parseFloat(place.lon), Number.parseFloat(place.lat)];\n const projection = map.getView().getProjection();\n const coord = proj.transform(coord_, 'EPSG:4326', projection);\n\n let {\n bbox\n } = place;\n\n if (bbox) {\n bbox = proj.transformExtent(\n // https://nominatim.org/release-docs/latest/api/Output/#boundingbox\n // Requires parseFloat on negative bbox entries\n [parseFloat(bbox[2]), parseFloat(bbox[0]), parseFloat(bbox[3]), parseFloat(bbox[1])], // SNWE -> WSEN\n 'EPSG:4326',\n projection\n );\n }\n\n const address = {\n formatted: addressHtml,\n details: addressObj,\n original: addressOriginal,\n };\n\n this.options.keepOpen === false && this.clearResults(true);\n\n if (this.options.preventDefault === true || this.options.preventMarker === true) {\n // No display change\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n coordinate: coord,\n bbox,\n place,\n });\n } else {\n // Display a marker\n const feature = this.createFeature(coord, address);\n\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n feature,\n coordinate: coord,\n bbox,\n place,\n });\n }\n\n if (this.options.preventDefault !== true && this.options.preventPanning !== true) {\n // Move & zoom to the position\n if (bbox) {\n map.getView().fit(bbox, {\n duration: 500,\n });\n } else {\n map.getView().animate({\n center: coord,\n // ol-geocoder results are too much zoomed -in Dominique92/ol-geocoder#235\n resolution: this.options.defaultFlyResolution || 10, // Meters per pixel\n duration: 500,\n });\n }\n }\n }\n\n createFeature(coord) {\n const feature = new Feature(new Point(coord));\n\n this.addLayer();\n feature.setStyle(this.options.featureStyle);\n feature.setId(randomId('geocoder-ft-'));\n this.getSource().addFeature(feature);\n\n return feature;\n }\n\n addressTemplate(address) {\n const html = [];\n\n if (address.name) {\n html.push(['{name}'].join(''));\n }\n\n if (address.road || address.building || address.house_number) {\n html.push(\n ['{building} {road} {house_number}'].join('')\n );\n }\n\n if (address.city || address.town || address.village) {\n html.push(\n ['{postcode} {city} {town} {village}'].join('')\n );\n }\n\n if (address.state || address.country) {\n html.push(['{state} {country}'].join(''));\n }\n\n return template(html.join('
      '), address);\n }\n\n newProvider() {\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n return new OpenStreet(this.options);\n case PROVIDERS.MAPQUEST:\n return new MapQuest();\n case PROVIDERS.PHOTON:\n return new Photon();\n case PROVIDERS.BING:\n return new Bing();\n case PROVIDERS.OPENCAGE:\n return new OpenCage();\n\n default:\n return this.options.provider;\n }\n }\n\n expand() {\n removeClass(this.els.input, klasses.spin);\n addClass(this.els.control, klasses.glass.expanded);\n window.setTimeout(() => this.els.input.focus(), 100);\n this.listenMapClick();\n }\n\n collapse() {\n this.els.input.value = '';\n this.els.input.blur();\n addClass(this.els.search, klasses.hidden);\n removeClass(this.els.control, klasses.glass.expanded);\n this.clearResults();\n }\n\n listenMapClick() {\n // already registered\n if (this.registeredListeners.mapClick) return;\n\n const that = this;\n const mapElement = this.Base.getMap().getTargetElement();\n\n this.registeredListeners.mapClick = true;\n\n // one-time fire click\n mapElement.addEventListener(\n 'click', {\n handleEvent(evt) {\n that.clearResults(true);\n mapElement.removeEventListener(evt.type, this, false);\n that.registeredListeners.mapClick = false;\n },\n },\n false\n );\n }\n\n clearResults(collapse) {\n collapse && this.options.targetType === TARGET_TYPE.GLASS ?\n this.collapse() :\n removeAllChildren(this.els.result);\n }\n\n getSource() {\n return this.layer.getSource();\n }\n\n addLayer() {\n let found = false;\n\n const map = this.Base.getMap();\n\n map.getLayers().forEach((layer) => {\n if (layer === this.layer) found = true;\n });\n\n if (!found) map.addLayer(this.layer);\n }\n}","import Control from 'ol/control/Control';\nimport Style from 'ol/style/Style';\nimport Icon from 'ol/style/Icon';\n\nimport {\n CONTROL_TYPE,\n DEFAULT_OPTIONS,\n FEATURE_SRC\n} from '../konstants';\n\nimport {\n Html\n} from './html';\nimport {\n Nominatim\n} from './nominatim';\nimport {\n assert,\n mergeOptions\n} from './helpers/mix';\n\n/**\n * @class Base\n * @extends {ol.control.Control}\n */\nexport default class Base extends Control {\n /**\n * @constructor\n * @param {string} type nominatim|reverse.\n * @param {object} options Options.\n */\n constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) {\n assert(typeof type === 'string', '@param `type` should be string!');\n assert(\n type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE,\n `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}'\n or '${CONTROL_TYPE.REVERSE}'!`\n );\n assert(typeof options === 'object', '@param `options` should be object!');\n\n DEFAULT_OPTIONS.featureStyle = [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ];\n\n let container;\n\n let $nominatim;\n\n const $html = new Html(options);\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n container = $html.els.container;\n }\n\n super({\n element: container,\n ...options, // Allows to add ol.control.Control options (as target:)\n });\n\n if (!(this instanceof Base)) return new Base();\n\n this.options = mergeOptions(DEFAULT_OPTIONS, options);\n this.container = container;\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n $nominatim = new Nominatim(this, $html.els);\n this.layer = $nominatim.layer;\n }\n }\n\n /**\n * @return {ol.layer.Vector} Returns the layer created by this control\n */\n getLayer() {\n return this.layer;\n }\n\n /**\n * @return {ol.source.Vector} Returns the source created by this control\n */\n getSource() {\n return this.getLayer().getSource();\n }\n\n /**\n * Set a new provider\n * @param {String} provider\n */\n setProvider(provider) {\n this.options.provider = provider;\n }\n\n /**\n * Set provider key\n * @param {String} key\n */\n setProviderKey(key) {\n this.options.key = key;\n }\n}"],"names":["klasses","LayerVector","SourceVector","proj","Feature","Point","Control","Style","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,MAAM,IAAI,GAAG,MAAM,CAAC;AAC3B;EACO,MAAM,UAAU,GAAG;EAC1B,EAAE,aAAa,EAAE,eAAe;EAChC,CAAC,CAAC;AACF;EACO,MAAM,YAAY,GAAG;EAC5B,EAAE,SAAS,EAAE,WAAW;EACxB,EAAE,OAAO,EAAE,SAAS;EACpB,CAAC,CAAC;AACF;EACO,MAAM,WAAW,GAAG;EAC3B,EAAE,KAAK,EAAE,cAAc;EACvB,EAAE,KAAK,EAAE,YAAY;EACrB,CAAC,CAAC;AACF;EACO,MAAM,WAAW,GAAG,mEAAmE,CAAC;AAC/F;EACO,MAAM,SAAS,GAAG;EACzB,EAAE,GAAG,EAAE,KAAK;EACZ,EAAE,QAAQ,EAAE,UAAU;EAC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EACd,IAAI,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC;EACvC,GAAG;AACH;EACA;EACA;EACA;EACA;EACA,EAAE,WAAW,CAAC,QAAQ,EAAE;EACxB,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;EACrC,GAAG;AACH;EACA;EACA;EACA;EACA;EACA,EAAE,cAAc,CAAC,GAAG,EAAE;EACtB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;EAC3B,GAAG;EACH;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"ol-geocoder-debug.js","sources":["../konstants/index.js","../src/helpers/mix.js","../src/helpers/dom.js","../src/html.js","../src/helpers/ajax.js","../src/providers/photon.js","../src/providers/osm.js","../src/providers/mapquest.js","../src/providers/bing.js","../src/providers/opencage.js","../src/nominatim.js","../src/base.js"],"sourcesContent":["import * as _VARS_ from './vars.json';\n\nexport const VARS = _VARS_;\n\nexport const EVENT_TYPE = {\n ADDRESSCHOSEN: 'addresschosen',\n};\n\nexport const CONTROL_TYPE = {\n NOMINATIM: 'nominatim',\n REVERSE: 'reverse',\n};\n\nexport const TARGET_TYPE = {\n GLASS: 'glass-button',\n INPUT: 'text-input',\n};\n\nexport const FEATURE_SRC = '//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png';\n\nexport const PROVIDERS = {\n OSM: 'osm',\n MAPQUEST: 'mapquest',\n PHOTON: 'photon',\n BING: 'bing',\n OPENCAGE: 'opencage',\n};\n\nexport const DEFAULT_OPTIONS = {\n provider: PROVIDERS.OSM,\n placeholder: 'Search for an address',\n featureStyle: null,\n targetType: TARGET_TYPE.GLASS,\n lang: 'en-US',\n limit: 5,\n keepOpen: false,\n preventDefault: false,\n preventPanning: false,\n preventMarker: false,\n defaultFlyResolution: 10, // Meters per pixel\n debug: false,\n};","/**\n * Overwrites obj1's values with obj2's and adds\n * obj2's if non existent in obj1\n * @returns obj3 a new object based on obj1 and obj2\n */\nexport function mergeOptions(obj1, obj2) {\n const obj3 = {};\n\n Object.keys(obj1).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj1, key)) {\n obj3[key] = obj1[key];\n }\n });\n\n Object.keys(obj2).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n obj3[key] = obj2[key];\n }\n });\n\n return obj3;\n}\n\nexport function assert(condition, message = 'Assertion failed') {\n if (!condition) {\n if (typeof Error !== 'undefined') throw new Error(message);\n\n throw message; // Fallback\n }\n}\n\nexport function now() {\n // Polyfill for window.performance.now()\n // @license http://opensource.org/licenses/MIT\n // copyright Paul Irish 2015\n // https://gist.github.com/paulirish/5438650\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n let nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = () => Date.now() - nowOffset;\n }\n\n return window.performance.now();\n}\n\nexport function flyTo(map, coord, duration = 500, resolution = 2.388657133911758) {\n map.getView().animate({\n center: coord,\n resolution: resolution,\n duration: duration,\n });\n}\n\nexport function randomId(prefix) {\n const id = now().toString(36);\n\n return prefix ? prefix + id : id;\n}\n\nexport function isNumeric(str) {\n return /^\\d+$/u.test(str);\n}\n\nexport function isEmpty(str) {\n return !str || str.length === 0;\n}\n\nexport function emptyArray(array) {\n while (array.length) array.pop();\n}\n\nexport function anyMatchInArray(source, target) {\n return source.some((each) => target.includes(each));\n}\n\nexport function everyMatchInArray(arr1, arr2) {\n return arr2.every((each) => arr1.includes(each));\n}\n\nexport function anyItemHasValue(obj, has = false) {\n const keys = Object.keys(obj);\n\n keys.forEach((key) => {\n if (!isEmpty(obj[key])) has = true;\n });\n\n return has;\n}","/* eslint-disable prefer-named-capture-group */\nimport {\n isNumeric\n} from './mix';\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to remove a class.\n */\nexport function addClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => addClass(each, classname));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (!hasClass(element, array[i])) {\n _addClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to add a class.\n */\nexport function removeClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => removeClass(each, classname, timeout));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (hasClass(element, array[i])) {\n _removeClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element} element DOM node.\n * @param {String} classname Classname.\n * @return {Boolean}\n */\nexport function hasClass(element, c) {\n // use native if available\n return element.classList ? element.classList.contains(c) : classRegex(c).test(element.className);\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String} classname Classe.\n */\nexport function toggleClass(element, classname) {\n if (Array.isArray(element)) {\n element.forEach((each) => toggleClass(each, classname));\n\n return;\n }\n\n // use native if available\n if (element.classList) {\n element.classList.toggle(classname);\n } else {\n hasClass(element, classname) ? _removeClass(element, classname) : _addClass(element, classname);\n }\n}\n\n/**\n * Abstraction to querySelectorAll for increased\n * performance and greater usability\n * @param {String} selector\n * @param {Element} context (optional)\n * @param {Boolean} findAll (optional)\n * @return (findAll) {Element} : {Array}\n */\nexport function $(id) {\n id = id[0] === '#' ? id.slice(1, 1 + id.length) : id;\n\n return document.getElementById(id);\n}\n\nexport function isElement(obj) {\n // DOM, Level2\n if ('HTMLElement' in window) {\n return !!obj && obj instanceof HTMLElement;\n }\n\n // Older browsers\n return !!obj && typeof obj === 'object' && obj.nodeType === 1 && !!obj.nodeName;\n}\n\nexport function getAllChildren(node, tag) {\n return [].slice.call(node.getElementsByTagName(tag));\n}\n\nexport function removeAllChildren(node) {\n while (node.firstChild) node.firstChild.remove();\n}\n\nexport function removeAll(collection) {\n let node;\n\n while ((node = collection[0])) node.remove();\n}\n\nexport function getChildren(node, tag) {\n return [].filter.call(node.childNodes, (el) =>\n tag ? el.nodeType === 1 && el.tagName.toLowerCase() === tag : el.nodeType === 1\n );\n}\n\nexport function template(html, row) {\n return html.replace(/\\{\\s*([\\w-]+)\\s*\\}/gu, (htm, key) => {\n const value = row[key] === undefined ? '' : row[key];\n\n return htmlEscape(value);\n });\n}\n\nexport function htmlEscape(str) {\n return String(str)\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n}\n\nexport function createElement(node, html) {\n let elem;\n\n if (Array.isArray(node)) {\n elem = document.createElement(node[0]);\n\n if (node[1].id) elem.id = node[1].id;\n\n if (node[1].classname) elem.className = node[1].classname;\n\n if (node[1].attr) {\n const {\n attr\n } = node[1];\n\n if (Array.isArray(attr)) {\n let i = -1;\n\n while (++i < attr.length) {\n elem.setAttribute(attr[i].name, attr[i].value);\n }\n } else {\n elem.setAttribute(attr.name, attr.value);\n }\n }\n } else {\n elem = document.createElement(node);\n }\n\n elem.innerHTML = html;\n\n const frag = document.createDocumentFragment();\n\n while (elem.childNodes[0]) frag.append(elem.childNodes[0]);\n\n elem.append(frag);\n\n return elem;\n}\n\nfunction classRegex(classname) {\n return new RegExp(`(^|\\\\s+) ${classname} (\\\\s+|$)`, 'u');\n}\n\nfunction _addClass(el, klass, timeout) {\n // use native if available\n if (el.classList) {\n el.classList.add(klass);\n } else {\n el.className = `${el.className} ${klass}`.trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _removeClass(el, klass), timeout);\n }\n}\n\nfunction _removeClass(el, klass, timeout) {\n if (el.classList) {\n el.classList.remove(klass);\n } else {\n el.className = el.className.replace(classRegex(klass), ' ').trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _addClass(el, klass), timeout);\n }\n}","import {\n VARS,\n TARGET_TYPE\n} from '../konstants';\n\nimport {\n createElement\n} from './helpers/dom';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Html\n */\nexport class Html {\n /**\n * @constructor\n * @param {object} options Options.\n */\n constructor(options) {\n this.options = options;\n this.els = this.createControl();\n }\n\n createControl() {\n let container;\n let containerClass;\n let elements;\n\n if (this.options.targetType === TARGET_TYPE.INPUT) {\n containerClass = `${klasses.namespace} ${klasses.inputText.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.input\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.inputText.control}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n } else {\n containerClass = `${klasses.namespace} ${klasses.glass.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.glass\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.glass.control}`),\n button: container.querySelector(`.${klasses.glass.button}`),\n input: container.querySelector(`.${klasses.glass.input}`),\n search: container.querySelector(`.${klasses.glass.search}`),\n result: container.querySelector(`.${klasses.glass.result}`),\n };\n }\n\n // set placeholder from options\n elements.input.placeholder = this.options.placeholder;\n\n return elements;\n }\n}\n\nHtml.glass = `\n
      \n \n \n \n
      \n
        \n`;\n\nHtml.input = `\n
        \n \n \n \n
        \n
          \n`;","export function json(obj) {\n return new Promise((resolve, reject) => {\n const url = encodeUrlXhr(obj.url, obj.data);\n const config = {\n method: 'GET',\n mode: 'cors',\n credentials: 'same-origin',\n };\n\n if (obj.jsonp) {\n jsonp(url, obj.callbackName, resolve);\n } else {\n fetch(url, config)\n .then((r) => r.json())\n .then(resolve)\n .catch(reject);\n }\n });\n}\n\nfunction toQueryString(obj) {\n return Object.keys(obj)\n .reduce((acc, k) => {\n acc.push(\n typeof obj[k] === 'object' ?\n toQueryString(obj[k]) :\n `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`\n );\n\n return acc;\n }, [])\n .join('&');\n}\n\nfunction encodeUrlXhr(url, data) {\n if (data && typeof data === 'object') {\n url += (/\\?/u.test(url) ? '&' : '?') + toQueryString(data);\n }\n\n return url;\n}\n\nfunction jsonp(url, key, callback) {\n // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js\n const {\n head\n } = document;\n const script = document.createElement('script');\n // generate minimally unique name for callback function\n const callbackName = `f${Math.round(Math.random() * Date.now())}`;\n\n // set request url\n script.setAttribute(\n 'src',\n // add callback parameter to the url\n // where key is the parameter key supplied\n // and callbackName is the parameter value\n `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}`\n );\n\n // place jsonp callback on window,\n // the script sent by the server should call this\n // function as it was passed as a url parameter\n window[callbackName] = (data) => {\n window[callbackName] = undefined;\n\n // clean up script tag created for request\n setTimeout(() => head.removeChild(script), 0);\n\n // hand data back to the user\n callback(data);\n };\n\n // actually make the request\n head.append(script);\n}","/**\n * @class Photon\n */\nexport default class Photon {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://photon.komoot.io/api/',\n\n params: {\n q: '',\n limit: 10,\n lang: 'en',\n },\n\n langs: ['de', 'it', 'fr', 'en'],\n };\n }\n\n getParameters(options) {\n options.lang = options.lang.toLowerCase();\n\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n limit: options.limit || this.settings.params.limit,\n\n lang: this.settings.langs.includes(options.lang) ? options.lang : this.settings.params.lang,\n },\n };\n }\n\n handleResponse(results) {\n if (results.features.length === 0) return [];\n\n return results.features.map((result) => ({\n lon: result.geometry.coordinates[0],\n lat: result.geometry.coordinates[1],\n\n address: {\n name: result.properties.name,\n postcode: result.properties.postcode,\n city: result.properties.city,\n state: result.properties.state,\n country: result.properties.country,\n },\n\n original: {\n formatted: result.properties.name,\n details: result.properties,\n },\n }));\n }\n}","/**\n * @class OpenStreet\n */\nexport default class OpenStreet {\n /**\n * @constructor\n */\n constructor(options) {\n this.settings = {\n url: 'https://nominatim.openstreetmap.org/search',\n ...options, // Allow custom URL for osm provider https://github.com/Dominique92/ol-geocoder/issues/266\n\n params: {\n q: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n viewbox: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(opt) {\n return {\n url: this.settings.url,\n\n params: {\n q: opt.query,\n format: this.settings.params.format,\n addressdetails: this.settings.params.addressdetails,\n limit: opt.limit || this.settings.params.limit,\n countrycodes: opt.countrycodes || this.settings.params.countrycodes,\n viewbox: opt.viewbox || this.settings.params.viewbox,\n 'accept-language': opt.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n bbox: result.boundingbox,\n\n address: {\n name: result.display_name,\n road: result.address.road || '',\n houseNumber: result.address.house_number || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class MapQuest\n */\nexport default class MapQuest {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://open.mapquestapi.com/nominatim/v1/search.php',\n\n params: {\n q: '',\n key: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n format: 'json',\n addressdetails: 1,\n limit: options.limit || this.settings.params.limit,\n countrycodes: options.countrycodes || this.settings.params.countrycodes,\n\n 'accept-language': options.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n\n address: {\n name: result.address.neighbourhood || '',\n road: result.address.road || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class Bing\n */\nexport default class Bing {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://dev.virtualearth.net/REST/v1/Locations',\n callbackName: 'jsonp',\n\n params: {\n query: '',\n key: '',\n includeNeighborhood: 0,\n maxResults: 10,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n callbackName: this.settings.callbackName,\n\n params: {\n query: options.query,\n key: options.key,\n\n includeNeighborhood: options.includeNeighborhood || this.settings.params.includeNeighborhood,\n\n maxResults: options.maxResults || this.settings.params.maxResults,\n },\n };\n }\n\n handleResponse(results) {\n const {\n resources\n } = results.resourceSets[0];\n\n if (resources.length === 0) return [];\n\n return resources.map((result) => ({\n lon: result.point.coordinates[1],\n lat: result.point.coordinates[0],\n\n address: {\n name: result.name,\n },\n\n original: {\n formatted: result.address.formattedAddress,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class OpenCage\n */\nexport default class OpenCage {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://api.opencagedata.com/geocode/v1/json?',\n\n params: {\n q: '',\n key: '',\n limit: 10,\n countrycode: '',\n pretty: 1,\n no_annotations: 1,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n limit: options.limit || this.settings.params.limit,\n countrycode: options.countrycodes || this.settings.params.countrycodes,\n },\n };\n }\n\n handleResponse(results) {\n if (results.results.length === 0) return [];\n\n return results.results.map((result) => ({\n lon: result.geometry.lng,\n lat: result.geometry.lat,\n\n address: {\n name: result.components.house_number || '',\n road: result.components.road || '',\n postcode: result.components.postcode,\n city: result.components.city || result.components.town,\n state: result.components.state,\n country: result.components.country,\n },\n\n original: {\n formatted: result.formatted,\n details: result.components,\n },\n }));\n }\n}","import LayerVector from 'ol/layer/Vector';\nimport SourceVector from 'ol/source/Vector';\nimport Point from 'ol/geom/Point';\nimport Feature from 'ol/Feature';\nimport * as proj from 'ol/proj';\n\nimport {\n VARS,\n TARGET_TYPE,\n PROVIDERS,\n EVENT_TYPE\n} from '../konstants';\nimport {\n hasClass,\n addClass,\n removeClass,\n createElement,\n template,\n removeAllChildren,\n} from './helpers/dom';\nimport {\n randomId\n} from './helpers/mix';\nimport {\n json\n} from './helpers/ajax';\n\nimport Photon from './providers/photon';\nimport OpenStreet from './providers/osm';\nimport MapQuest from './providers/mapquest';\nimport Bing from './providers/bing';\nimport OpenCage from './providers/opencage';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Nominatim\n */\nexport class Nominatim {\n /**\n * @constructor\n * @param {Function} base Base class.\n */\n constructor(base, els) {\n this.Base = base;\n\n this.layerName = randomId('geocoder-layer-');\n this.layer = new LayerVector({\n name: this.layerName,\n source: new SourceVector(),\n displayInLayerSwitcher: false, // Remove search layer from legend https://github.com/Dominique92/ol-geocoder/issues/256\n });\n\n this.options = base.options;\n // provider is either the name of a built-in provider as a string or an\n // object that implements the provider API\n this.options.provider =\n typeof this.options.provider === 'string' ?\n this.options.provider.toLowerCase() :\n this.options.provider;\n this.provider = this.newProvider();\n\n this.els = els;\n this.lastQuery = '';\n this.container = this.els.container;\n this.registeredListeners = {\n mapClick: false,\n };\n this.setListeners();\n }\n\n setListeners() {\n const openSearch = (evt) => {\n evt.stopPropagation();\n hasClass(this.els.control, klasses.glass.expanded) ? this.collapse() : this.expand();\n };\n const query = (evt) => {\n const value = evt.target.value.trim();\n const hit = evt.key ?\n evt.key === 'Enter' :\n evt.which ?\n evt.which === 13 :\n evt.keyCode ?\n evt.keyCode === 13 :\n false;\n\n if (hit) {\n evt.preventDefault();\n this.query(value);\n }\n };\n const stopBubbling = (evt) => evt.stopPropagation();\n const search = () => {\n this.els.input.focus();\n this.query(this.els.input.value);\n };\n const handleValue = (evt) => {\n const value = evt.target.value.trim();\n\n value.length !== 0 ?\n removeClass(this.els.search, klasses.hidden) :\n addClass(this.els.search, klasses.hidden);\n };\n\n this.els.input.addEventListener('keypress', query, false);\n this.els.input.addEventListener('click', stopBubbling, false);\n this.els.input.addEventListener('input', handleValue, false);\n this.els.search.addEventListener('click', search, false);\n\n if (this.options.targetType === TARGET_TYPE.GLASS) {\n this.els.button.addEventListener('click', openSearch, false);\n }\n }\n\n query(q) {\n // lazy provider\n if (!this.provider) {\n this.provider = this.newProvider();\n }\n\n const parameters = this.provider.getParameters({\n query: q,\n key: this.options.key,\n lang: this.options.lang,\n countrycodes: this.options.countrycodes,\n viewbox: this.options.viewbox,\n limit: this.options.limit,\n });\n\n if (this.lastQuery === q && this.els.result.firstChild) return;\n\n this.lastQuery = q;\n this.clearResults();\n addClass(this.els.search, klasses.spin);\n\n const ajax = {\n url: parameters.url,\n data: parameters.params,\n };\n\n if (parameters.callbackName) {\n ajax.jsonp = true;\n ajax.callbackName = parameters.callbackName;\n }\n\n json(ajax)\n .then((res) => {\n // eslint-disable-next-line no-console\n this.options.debug && console.info(res);\n\n removeClass(this.els.search, klasses.spin);\n\n // will be fullfiled according to provider\n const res_ = this.provider.handleResponse(res);\n\n if (res_) {\n this.createList(res_);\n this.listenMapClick();\n }\n })\n .catch(() => {\n removeClass(this.els.search, klasses.spin);\n\n const li = createElement('li', '
          Error! No internet connection?
          ');\n\n this.els.result.append(li);\n });\n }\n\n createList(response) {\n const ul = this.els.result;\n\n response.forEach((row) => {\n let addressHtml;\n\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n addressHtml = `${row.address.name}`;\n\n break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n const html = `${addressHtml}`;\n const li = createElement('li', html);\n\n li.addEventListener(\n 'click',\n (evt) => {\n evt.preventDefault();\n this.chosen(row, addressHtml, row.address, row.original);\n },\n false\n );\n\n ul.append(li);\n });\n }\n\n chosen(place, addressHtml, addressObj, addressOriginal) {\n const map = this.Base.getMap();\n const coord_ = [Number.parseFloat(place.lon), Number.parseFloat(place.lat)];\n const projection = map.getView().getProjection();\n const coord = proj.transform(coord_, 'EPSG:4326', projection);\n\n let {\n bbox\n } = place;\n\n if (bbox) {\n bbox = proj.transformExtent(\n // https://nominatim.org/release-docs/latest/api/Output/#boundingbox\n // Requires parseFloat on negative bbox entries\n [parseFloat(bbox[2]), parseFloat(bbox[0]), parseFloat(bbox[3]), parseFloat(bbox[1])], // SNWE -> WSEN\n 'EPSG:4326',\n projection\n );\n }\n\n const address = {\n formatted: addressHtml,\n details: addressObj,\n original: addressOriginal,\n };\n\n this.options.keepOpen === false && this.clearResults(true);\n\n if (this.options.preventDefault === true || this.options.preventMarker === true) {\n // No display change\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n coordinate: coord,\n bbox,\n place,\n });\n } else {\n // Display a marker\n const feature = this.createFeature(coord, address);\n\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n feature,\n coordinate: coord,\n bbox,\n place,\n });\n }\n\n if (this.options.preventDefault !== true && this.options.preventPanning !== true) {\n // Move & zoom to the position\n if (bbox) {\n map.getView().fit(bbox, {\n duration: 500,\n });\n } else {\n map.getView().animate({\n center: coord,\n // ol-geocoder results are too much zoomed -in Dominique92/ol-geocoder#235\n resolution: this.options.defaultFlyResolution,\n duration: 500,\n });\n }\n }\n }\n\n createFeature(coord) {\n const feature = new Feature(new Point(coord));\n\n this.addLayer();\n feature.setStyle(this.options.featureStyle);\n feature.setId(randomId('geocoder-ft-'));\n this.getSource().addFeature(feature);\n\n return feature;\n }\n\n addressTemplate(address) {\n const html = [];\n\n if (address.name) {\n html.push(['{name}'].join(''));\n }\n\n if (address.road || address.building || address.house_number) {\n html.push(\n ['{building} {road} {house_number}'].join('')\n );\n }\n\n if (address.city || address.town || address.village) {\n html.push(\n ['{postcode} {city} {town} {village}'].join('')\n );\n }\n\n if (address.state || address.country) {\n html.push(['{state} {country}'].join(''));\n }\n\n return template(html.join('
          '), address);\n }\n\n newProvider() {\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n return new OpenStreet(this.options);\n case PROVIDERS.MAPQUEST:\n return new MapQuest();\n case PROVIDERS.PHOTON:\n return new Photon();\n case PROVIDERS.BING:\n return new Bing();\n case PROVIDERS.OPENCAGE:\n return new OpenCage();\n\n default:\n return this.options.provider;\n }\n }\n\n expand() {\n removeClass(this.els.input, klasses.spin);\n addClass(this.els.control, klasses.glass.expanded);\n window.setTimeout(() => this.els.input.focus(), 100);\n this.listenMapClick();\n }\n\n collapse() {\n this.els.input.value = '';\n this.els.input.blur();\n addClass(this.els.search, klasses.hidden);\n removeClass(this.els.control, klasses.glass.expanded);\n this.clearResults();\n }\n\n listenMapClick() {\n // already registered\n if (this.registeredListeners.mapClick) return;\n\n const that = this;\n const mapElement = this.Base.getMap().getTargetElement();\n\n this.registeredListeners.mapClick = true;\n\n // one-time fire click\n mapElement.addEventListener(\n 'click', {\n handleEvent(evt) {\n that.clearResults(true);\n mapElement.removeEventListener(evt.type, this, false);\n that.registeredListeners.mapClick = false;\n },\n },\n false\n );\n }\n\n clearResults(collapse) {\n collapse && this.options.targetType === TARGET_TYPE.GLASS ?\n this.collapse() :\n removeAllChildren(this.els.result);\n }\n\n getSource() {\n return this.layer.getSource();\n }\n\n addLayer() {\n let found = false;\n\n const map = this.Base.getMap();\n\n map.getLayers().forEach((layer) => {\n if (layer === this.layer) found = true;\n });\n\n if (!found) map.addLayer(this.layer);\n }\n}","import Control from 'ol/control/Control';\nimport Style from 'ol/style/Style';\nimport Icon from 'ol/style/Icon';\n\nimport {\n CONTROL_TYPE,\n DEFAULT_OPTIONS,\n FEATURE_SRC\n} from '../konstants';\n\nimport {\n Html\n} from './html';\nimport {\n Nominatim\n} from './nominatim';\nimport {\n assert,\n mergeOptions\n} from './helpers/mix';\n\n/**\n * @class Base\n * @extends {ol.control.Control}\n */\nexport default class Base extends Control {\n /**\n * @constructor\n * @param {string} type nominatim|reverse.\n * @param {object} options Options.\n */\n constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) {\n assert(typeof type === 'string', '@param `type` should be string!');\n assert(\n type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE,\n `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}'\n or '${CONTROL_TYPE.REVERSE}'!`\n );\n assert(typeof options === 'object', '@param `options` should be object!');\n\n DEFAULT_OPTIONS.featureStyle = [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ];\n\n let container;\n\n let $nominatim;\n\n const $html = new Html(options);\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n container = $html.els.container;\n }\n\n super({\n element: container,\n ...options, // Allows to add ol.control.Control options (as target:)\n });\n\n if (!(this instanceof Base)) return new Base();\n\n this.options = mergeOptions(DEFAULT_OPTIONS, options);\n this.container = container;\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n $nominatim = new Nominatim(this, $html.els);\n this.layer = $nominatim.layer;\n }\n }\n\n /**\n * @return {ol.layer.Vector} Returns the layer created by this control\n */\n getLayer() {\n return this.layer;\n }\n\n /**\n * @return {ol.source.Vector} Returns the source created by this control\n */\n getSource() {\n return this.getLayer().getSource();\n }\n\n /**\n * Set a new provider\n * @param {String} provider\n */\n setProvider(provider) {\n this.options.provider = provider;\n }\n\n /**\n * Set provider key\n * @param {String} key\n */\n setProviderKey(key) {\n this.options.key = key;\n }\n}"],"names":["klasses","LayerVector","SourceVector","proj","Feature","Point","Control","Style","Icon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEO,MAAM,IAAI,GAAG,MAAM,CAAC;AAC3B;EACO,MAAM,UAAU,GAAG;EAC1B,EAAE,aAAa,EAAE,eAAe;E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AI,IAAI,IAAI,KAAK,YAAY,CAAC,SAAS,EAAE;EACzC,MAAM,UAAU,GAAG,IAAI,SAAS,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC;EAClD,MAAM,IAAI,CAAC,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC;EACpC,KAAK;EACL,GAAG;AACH;EACA;EACA;EACA;EACA,EAAE,QAAQ,GAAG;EACb,IAAI,OAAO,IAAI,CAAC,KAAK,CAAC;EACtB,GAAG;AACH;EACA;EACA;EACA;EACA,EAAE,SAAS,GAAG;EACd,IAAI,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,SAAS,EAAE,CAAC;EACvC,GAAG;AACH;EACA;EACA;EACA;EACA;EACA,EAAE,WAAW,CAAC,QAAQ,EAAE;EACxB,IAAI,IAAI,CAAC,OAAO,CAAC,QAAQ,GAAG,QAAQ,CAAC;EACrC,GAAG;AACH;EACA;EACA;EACA;EACA;EACA,EAAE,cAAc,CAAC,GAAG,EAAE;EACtB,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,GAAG,GAAG,CAAC;EAC3B,GAAG;EACH;;;;;;;;"} \ No newline at end of file diff --git a/dist/ol-geocoder.css b/dist/ol-geocoder.css index ae1bf7f..8594e33 100644 --- a/dist/ol-geocoder.css +++ b/dist/ol-geocoder.css @@ -1,9 +1,11 @@ /*! - * ol-geocoder - v4.2.1 + * ol-geocoder - v4.3.0 * A geocoder extension compatible with OpenLayers v7+ & v8+ * https://github.com/Dominique92/ol-geocoder - * Built: Mon Sep 04 2023 16:09:30 GMT+0200 (heure d’été d’Europe centrale) - */.ol-touch .ol-control.gcd-gl-control button { + * Built: Tue Sep 05 2023 21:03:57 GMT+0200 (heure d’été d’Europe centrale) + */ + + .ol-touch .ol-control.gcd-gl-control button { font-size: 1.14em; } .ol-touch .ol-geocoder.gcd-gl-container { diff --git a/dist/ol-geocoder.js b/dist/ol-geocoder.js index b9373ed..28b2e6f 100644 --- a/dist/ol-geocoder.js +++ b/dist/ol-geocoder.js @@ -1,8 +1,8 @@ /*! - * ol-geocoder - v4.2.1 + * ol-geocoder - v4.3.0 * A geocoder extension compatible with OpenLayers v7+ & v8+ * https://github.com/Dominique92/ol-geocoder - * Built: Mon Sep 04 2023 16:09:28 GMT+0200 (heure d’été d’Europe centrale) + * Built: Tue Sep 05 2023 21:03:55 GMT+0200 (heure d’été d’Europe centrale) */ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("ol/control/Control"),require("ol/style/Style"),require("ol/style/Icon"),require("ol/layer/Vector"),require("ol/source/Vector"),require("ol/geom/Point"),require("ol/Feature"),require("ol/proj")):"function"==typeof define&&define.amd?define(["ol/control/Control","ol/style/Style","ol/style/Icon","ol/layer/Vector","ol/source/Vector","ol/geom/Point","ol/Feature","ol/proj"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Geocoder=t(e.ol.control.Control,e.ol.style.Style,e.ol.style.Icon,e.ol.layer.Vector,e.ol.source.Vector,e.ol.geom.Point,e.ol.Feature,e.ol.proj)}(this,(function(e,t,s,r,n,o,a,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var d=l(e),u=l(t),p=l(s),h=l(r),m=l(n),g=l(o),y=l(a),f=c(i),b="gcd-container",v="gcd-button-control",w="gcd-input-query",x="gcd-input-search",k={namespace:"ol-geocoder",spin:"gcd-pseudo-rotate",hidden:"gcd-hidden",address:"gcd-address",country:"gcd-country",city:"gcd-city",road:"gcd-road",olControl:"ol-control",glass:{container:"gcd-gl-container",control:"gcd-gl-control",button:"gcd-gl-btn",input:"gcd-gl-input",expanded:"gcd-gl-expanded",search:"gcd-gl-search",result:"gcd-gl-result"},inputText:{container:"gcd-txt-container",control:"gcd-txt-control",input:"gcd-txt-input",search:"gcd-txt-search",icon:"gcd-txt-glass",result:"gcd-txt-result"}},$={containerId:b,buttonControlId:v,inputQueryId:w,inputSearchId:x,cssClasses:k};const q=Object.freeze({__proto__:null,containerId:b,buttonControlId:v,inputQueryId:w,inputSearchId:x,cssClasses:k,default:$}),S="addresschosen",j="nominatim",L="reverse",E="glass-button",C="text-input",T="osm",N="mapquest",P="photon",A="bing",I="opencage",R={provider:T,placeholder:"Search for an address",featureStyle:null,targetType:E,lang:"en-US",limit:5,keepOpen:!1,preventDefault:!1,debug:!1};function O(e,t="Assertion failed"){if(!e){if("undefined"!=typeof Error)throw new Error(t);throw t}}function F(e){const t=function(){if("performance"in window==0&&(window.performance={}),"now"in window.performance==0){let e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),window.performance.now=()=>Date.now()-e}return window.performance.now()}().toString(36);return e?e+t:t}function _(e){return/^\d+$/u.test(e)}function M(e,t,s){if(Array.isArray(e))return void e.forEach((e=>M(e,t)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)V(e,r[n])||G(e,r[n],s)}function D(e,t,s){if(Array.isArray(e))return void e.forEach((e=>D(e,t,s)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)V(e,r[n])&&z(e,r[n],s)}function V(e,t){return e.classList?e.classList.contains(t):U(t).test(e.className)}function Q(e,t){return e.replace(/\{\s*([\w-]+)\s*\}/gu,((e,s)=>{const r=void 0===t[s]?"":t[s];return String(r).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}))}function B(e,t){let s;if(Array.isArray(e)){if(s=document.createElement(e[0]),e[1].id&&(s.id=e[1].id),e[1].classname&&(s.className=e[1].classname),e[1].attr){const{attr:t}=e[1];if(Array.isArray(t)){let e=-1;for(;++ez(e,t)),s)}function z(e,t,s){e.classList?e.classList.remove(t):e.className=e.className.replace(U(t)," ").trim(),s&&_(s)&&window.setTimeout((()=>G(e,t)),s)}const H=q.cssClasses;class K{constructor(e){this.options=e,this.els=this.createControl()}createControl(){let e,t,s;return this.options.targetType===C?(t=`${H.namespace} ${H.inputText.container}`,e=B(["div",{id:q.containerId,classname:t}],K.input),s={container:e,control:e.querySelector(`.${H.inputText.control}`),input:e.querySelector(`.${H.inputText.input}`),search:e.querySelector(`.${H.inputText.search}`),result:e.querySelector(`.${H.inputText.result}`)}):(t=`${H.namespace} ${H.glass.container}`,e=B(["div",{id:q.containerId,classname:t}],K.glass),s={container:e,control:e.querySelector(`.${H.glass.control}`),button:e.querySelector(`.${H.glass.button}`),input:e.querySelector(`.${H.glass.input}`),search:e.querySelector(`.${H.glass.search}`),result:e.querySelector(`.${H.glass.result}`)}),s.input.placeholder=this.options.placeholder,s}}K.glass=`\n
          \n \n \n \n
          \n
            \n`,K.input=`\n
            \n \n \n \n
            \n
              \n`;class J{constructor(){this.settings={url:"https://photon.komoot.io/api/",params:{q:"",limit:10,lang:"en"},langs:["de","it","fr","en"]}}getParameters(e){return e.lang=e.lang.toLowerCase(),{url:this.settings.url,params:{q:e.query,limit:e.limit||this.settings.params.limit,lang:this.settings.langs.includes(e.lang)?e.lang:this.settings.params.lang}}}handleResponse(e){return 0===e.features.length?[]:e.features.map((e=>({lon:e.geometry.coordinates[0],lat:e.geometry.coordinates[1],address:{name:e.properties.name,postcode:e.properties.postcode,city:e.properties.city,state:e.properties.state,country:e.properties.country},original:{formatted:e.properties.name,details:e.properties}})))}}class W{constructor(e){this.settings={url:"https://nominatim.openstreetmap.org/search",...e,params:{q:"",format:"json",addressdetails:1,limit:10,countrycodes:"",viewbox:"","accept-language":"en-US"}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,format:this.settings.params.format,addressdetails:this.settings.params.addressdetails,limit:e.limit||this.settings.params.limit,countrycodes:e.countrycodes||this.settings.params.countrycodes,viewbox:e.viewbox||this.settings.params.viewbox,"accept-language":e.lang||this.settings.params["accept-language"]}}}handleResponse(e){return 0===e.length?[]:e.map((e=>({lon:e.lon,lat:e.lat,bbox:e.boundingbox,address:{name:e.display_name,road:e.address.road||"",houseNumber:e.address.house_number||"",postcode:e.address.postcode,city:e.address.city||e.address.town,state:e.address.state,country:e.address.country},original:{formatted:e.display_name,details:e.address}})))}}class X{constructor(){this.settings={url:"https://open.mapquestapi.com/nominatim/v1/search.php",params:{q:"",key:"",format:"json",addressdetails:1,limit:10,countrycodes:"","accept-language":"en-US"}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,key:e.key,format:"json",addressdetails:1,limit:e.limit||this.settings.params.limit,countrycodes:e.countrycodes||this.settings.params.countrycodes,"accept-language":e.lang||this.settings.params["accept-language"]}}}handleResponse(e){return 0===e.length?[]:e.map((e=>({lon:e.lon,lat:e.lat,address:{name:e.address.neighbourhood||"",road:e.address.road||"",postcode:e.address.postcode,city:e.address.city||e.address.town,state:e.address.state,country:e.address.country},original:{formatted:e.display_name,details:e.address}})))}}class Y{constructor(){this.settings={url:"https://dev.virtualearth.net/REST/v1/Locations",callbackName:"jsonp",params:{query:"",key:"",includeNeighborhood:0,maxResults:10}}}getParameters(e){return{url:this.settings.url,callbackName:this.settings.callbackName,params:{query:e.query,key:e.key,includeNeighborhood:e.includeNeighborhood||this.settings.params.includeNeighborhood,maxResults:e.maxResults||this.settings.params.maxResults}}}handleResponse(e){const{resources:t}=e.resourceSets[0];return 0===t.length?[]:t.map((e=>({lon:e.point.coordinates[1],lat:e.point.coordinates[0],address:{name:e.name},original:{formatted:e.address.formattedAddress,details:e.address}})))}}class Z{constructor(){this.settings={url:"https://api.opencagedata.com/geocode/v1/json?",params:{q:"",key:"",limit:10,countrycode:"",pretty:1,no_annotations:1}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,key:e.key,limit:e.limit||this.settings.params.limit,countrycode:e.countrycodes||this.settings.params.countrycodes}}}handleResponse(e){return 0===e.results.length?[]:e.results.map((e=>({lon:e.geometry.lng,lat:e.geometry.lat,address:{name:e.components.house_number||"",road:e.components.road||"",postcode:e.components.postcode,city:e.components.city||e.components.town,state:e.components.state,country:e.components.country},original:{formatted:e.formatted,details:e.components}})))}}function ee(e){return new Promise(((t,s)=>{const r=function(e,t){t&&"object"==typeof t&&(e+=(/\?/u.test(e)?"&":"?")+te(t));return e}(e.url,e.data),n={method:"GET",mode:"cors",credentials:"same-origin"};e.jsonp?function(e,t,s){const{head:r}=document,n=document.createElement("script"),o=`f${Math.round(Math.random()*Date.now())}`;n.setAttribute("src",`${e+(e.indexOf("?")>0?"&":"?")+t}=${o}`),window[o]=e=>{window[o]=void 0,setTimeout((()=>r.removeChild(n)),0),s(e)},r.append(n)}(r,e.callbackName,t):fetch(r,n).then((e=>e.json())).then(t).catch(s)}))}function te(e){return Object.keys(e).reduce(((t,s)=>(t.push("object"==typeof e[s]?te(e[s]):`${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`),t)),[]).join("&")}const se=q.cssClasses;class re{constructor(e,t){this.Base=e,this.layerName=F("geocoder-layer-"),this.layer=new h.default({name:this.layerName,source:new m.default,displayInLayerSwitcher:!1}),this.options=e.options,this.options.provider="string"==typeof this.options.provider?this.options.provider.toLowerCase():this.options.provider,this.provider=this.newProvider(),this.els=t,this.lastQuery="",this.container=this.els.container,this.registeredListeners={mapClick:!1},this.setListeners()}setListeners(){const e=e=>{e.stopPropagation(),V(this.els.control,se.glass.expanded)?this.collapse():this.expand()};this.els.input.addEventListener("keypress",(e=>{const t=e.target.value.trim();(e.key?"Enter"===e.key:e.which?13===e.which:!!e.keyCode&&13===e.keyCode)&&(e.preventDefault(),this.query(t))}),!1),this.els.input.addEventListener("click",(e=>e.stopPropagation()),!1),this.els.input.addEventListener("input",(e=>{0!==e.target.value.trim().length?D(this.els.search,se.hidden):M(this.els.search,se.hidden)}),!1),this.els.search.addEventListener("click",(()=>{this.els.input.focus(),M(this.els.search,se.hidden),this.query(this.els.input.value)}),!1),this.options.targetType===E&&this.els.button.addEventListener("click",e,!1)}query(e){this.provider||(this.provider=this.newProvider());const t=this.provider.getParameters({query:e,key:this.options.key,lang:this.options.lang,countrycodes:this.options.countrycodes,viewbox:this.options.viewbox,limit:this.options.limit});if(this.lastQuery===e&&this.els.result.firstChild)return;this.lastQuery=e,this.clearResults(),M(this.els.search,se.spin);const s={url:t.url,data:t.params};t.callbackName&&(s.jsonp=!0,s.callbackName=t.callbackName),ee(s).then((e=>{this.options.debug&&console.info(e),D(this.els.search,se.spin);const t=this.provider.handleResponse(e);t&&(this.createList(t),this.listenMapClick())})).catch((()=>{D(this.els.search,se.spin);const e=B("li","
              Error! No internet connection?
              ");this.els.result.append(e)}))}createList(e){const t=this.els.result;e.forEach((e=>{let s;if(this.options.provider===T)s=`${e.address.name}`;else s=this.addressTemplate(e.address);const r=B("li",`${s}`);r.addEventListener("click",(t=>{t.preventDefault(),this.chosen(e,s,e.address,e.original)}),!1),t.append(r)}))}chosen(e,t,s,r){const n=this.Base.getMap(),o=[Number.parseFloat(e.lon),Number.parseFloat(e.lat)],a=n.getView().getProjection(),i=f.transform(o,"EPSG:4326",a);let{bbox:l}=e;l&&(l=f.transformExtent([parseFloat(l[2]),parseFloat(l[0]),parseFloat(l[3]),parseFloat(l[1])],"EPSG:4326",a));const c={formatted:t,details:s,original:r};if(!1===this.options.keepOpen&&this.clearResults(!0),!0===this.options.preventDefault||!0===this.options.preventMarker)this.Base.dispatchEvent({type:S,address:c,coordinate:i,bbox:l,place:e});else{const t=this.createFeature(i,c);this.Base.dispatchEvent({type:S,address:c,feature:t,coordinate:i,bbox:l,place:e})}!0!==this.options.preventDefault&&!0!==this.options.preventPanning&&(l?n.getView().fit(l,{duration:500}):n.getView().animate({center:i,resolution:this.options.defaultFlyResolution||10,duration:500}))}createFeature(e){const t=new y.default(new g.default(e));return this.addLayer(),t.setStyle(this.options.featureStyle),t.setId(F("geocoder-ft-")),this.getSource().addFeature(t),t}addressTemplate(e){const t=[];return e.name&&t.push(['{name}'].join("")),(e.road||e.building||e.house_number)&&t.push(['{building} {road} {house_number}'].join("")),(e.city||e.town||e.village)&&t.push(['{postcode} {city} {town} {village}'].join("")),(e.state||e.country)&&t.push(['{state} {country}'].join("")),Q(t.join("
              "),e)}newProvider(){switch(this.options.provider){case T:return new W(this.options);case N:return new X;case P:return new J;case A:return new Y;case I:return new Z;default:return this.options.provider}}expand(){D(this.els.input,se.spin),M(this.els.control,se.glass.expanded),window.setTimeout((()=>this.els.input.focus()),100),this.listenMapClick()}collapse(){this.els.input.value="",this.els.input.blur(),M(this.els.search,se.hidden),D(this.els.control,se.glass.expanded),this.clearResults()}listenMapClick(){if(this.registeredListeners.mapClick)return;const e=this,t=this.Base.getMap().getTargetElement();this.registeredListeners.mapClick=!0,t.addEventListener("click",{handleEvent(s){e.clearResults(!0),t.removeEventListener(s.type,this,!1),e.registeredListeners.mapClick=!1}},!1)}clearResults(e){e&&this.options.targetType===E?this.collapse():function(e){for(;e.firstChild;)e.firstChild.remove()}(this.els.result)}getSource(){return this.layer.getSource()}addLayer(){let e=!1;const t=this.Base.getMap();t.getLayers().forEach((t=>{t===this.layer&&(e=!0)})),e||t.addLayer(this.layer)}}class ne extends d.default{constructor(e=j,t={}){let s,r;O("string"==typeof e,"@param `type` should be string!"),O(e===j||e===L,`@param 'type' should be '${j}'\n or '${L}'!`),O("object"==typeof t,"@param `options` should be object!"),R.featureStyle=[new u.default({image:new p.default({scale:.7,src:"//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png"})})];const n=new K(t);if(e===j&&(s=n.els.container),super({element:s,...t}),!(this instanceof ne))return new ne;this.options=function(e,t){const s={};return Object.keys(e).forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=e[t])})),Object.keys(t).forEach((e=>{Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e])})),s}(R,t),this.container=s,e===j&&(r=new re(this,n.els),this.layer=r.layer)}getLayer(){return this.layer}getSource(){return this.getLayer().getSource()}setProvider(e){this.options.provider=e}setProviderKey(e){this.options.key=e}}return ne})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("ol/control/Control"),require("ol/style/Style"),require("ol/style/Icon"),require("ol/layer/Vector"),require("ol/source/Vector"),require("ol/geom/Point"),require("ol/Feature"),require("ol/proj")):"function"==typeof define&&define.amd?define(["ol/control/Control","ol/style/Style","ol/style/Icon","ol/layer/Vector","ol/source/Vector","ol/geom/Point","ol/Feature","ol/proj"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).Geocoder=t(e.ol.control.Control,e.ol.style.Style,e.ol.style.Icon,e.ol.layer.Vector,e.ol.source.Vector,e.ol.geom.Point,e.ol.Feature,e.ol.proj)}(this,(function(e,t,s,r,n,o,a,i){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(s){if("default"!==s){var r=Object.getOwnPropertyDescriptor(e,s);Object.defineProperty(t,s,r.get?r:{enumerable:!0,get:function(){return e[s]}})}})),t.default=e,Object.freeze(t)}var d=l(e),u=l(t),p=l(s),h=l(r),m=l(n),g=l(o),y=l(a),f=c(i),b="gcd-container",v="gcd-button-control",w="gcd-input-query",x="gcd-input-search",k={namespace:"ol-geocoder",spin:"gcd-pseudo-rotate",hidden:"gcd-hidden",address:"gcd-address",country:"gcd-country",city:"gcd-city",road:"gcd-road",olControl:"ol-control",glass:{container:"gcd-gl-container",control:"gcd-gl-control",button:"gcd-gl-btn",input:"gcd-gl-input",expanded:"gcd-gl-expanded",search:"gcd-gl-search",result:"gcd-gl-result"},inputText:{container:"gcd-txt-container",control:"gcd-txt-control",input:"gcd-txt-input",search:"gcd-txt-search",icon:"gcd-txt-glass",result:"gcd-txt-result"}},$={containerId:b,buttonControlId:v,inputQueryId:w,inputSearchId:x,cssClasses:k};const q=Object.freeze({__proto__:null,containerId:b,buttonControlId:v,inputQueryId:w,inputSearchId:x,cssClasses:k,default:$}),S="addresschosen",j="nominatim",L="reverse",E="glass-button",C="text-input",T="osm",P="mapquest",N="photon",A="bing",I="opencage",R={provider:T,placeholder:"Search for an address",featureStyle:null,targetType:E,lang:"en-US",limit:5,keepOpen:!1,preventDefault:!1,preventPanning:!1,preventMarker:!1,defaultFlyResolution:10,debug:!1};function O(e,t="Assertion failed"){if(!e){if("undefined"!=typeof Error)throw new Error(t);throw t}}function F(e){const t=function(){if("performance"in window==0&&(window.performance={}),"now"in window.performance==0){let e=Date.now();performance.timing&&performance.timing.navigationStart&&(e=performance.timing.navigationStart),window.performance.now=()=>Date.now()-e}return window.performance.now()}().toString(36);return e?e+t:t}function _(e){return/^\d+$/u.test(e)}function M(e,t,s){if(Array.isArray(e))return void e.forEach((e=>M(e,t)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)V(e,r[n])||G(e,r[n],s)}function D(e,t,s){if(Array.isArray(e))return void e.forEach((e=>D(e,t,s)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)V(e,r[n])&&z(e,r[n],s)}function V(e,t){return e.classList?e.classList.contains(t):U(t).test(e.className)}function Q(e,t){return e.replace(/\{\s*([\w-]+)\s*\}/gu,((e,s)=>{const r=void 0===t[s]?"":t[s];return String(r).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}))}function B(e,t){let s;if(Array.isArray(e)){if(s=document.createElement(e[0]),e[1].id&&(s.id=e[1].id),e[1].classname&&(s.className=e[1].classname),e[1].attr){const{attr:t}=e[1];if(Array.isArray(t)){let e=-1;for(;++ez(e,t)),s)}function z(e,t,s){e.classList?e.classList.remove(t):e.className=e.className.replace(U(t)," ").trim(),s&&_(s)&&window.setTimeout((()=>G(e,t)),s)}const H=q.cssClasses;class K{constructor(e){this.options=e,this.els=this.createControl()}createControl(){let e,t,s;return this.options.targetType===C?(t=`${H.namespace} ${H.inputText.container}`,e=B(["div",{id:q.containerId,classname:t}],K.input),s={container:e,control:e.querySelector(`.${H.inputText.control}`),input:e.querySelector(`.${H.inputText.input}`),search:e.querySelector(`.${H.inputText.search}`),result:e.querySelector(`.${H.inputText.result}`)}):(t=`${H.namespace} ${H.glass.container}`,e=B(["div",{id:q.containerId,classname:t}],K.glass),s={container:e,control:e.querySelector(`.${H.glass.control}`),button:e.querySelector(`.${H.glass.button}`),input:e.querySelector(`.${H.glass.input}`),search:e.querySelector(`.${H.glass.search}`),result:e.querySelector(`.${H.glass.result}`)}),s.input.placeholder=this.options.placeholder,s}}function J(e){return new Promise(((t,s)=>{const r=function(e,t){t&&"object"==typeof t&&(e+=(/\?/u.test(e)?"&":"?")+W(t));return e}(e.url,e.data),n={method:"GET",mode:"cors",credentials:"same-origin"};e.jsonp?function(e,t,s){const{head:r}=document,n=document.createElement("script"),o=`f${Math.round(Math.random()*Date.now())}`;n.setAttribute("src",`${e+(e.indexOf("?")>0?"&":"?")+t}=${o}`),window[o]=e=>{window[o]=void 0,setTimeout((()=>r.removeChild(n)),0),s(e)},r.append(n)}(r,e.callbackName,t):fetch(r,n).then((e=>e.json())).then(t).catch(s)}))}function W(e){return Object.keys(e).reduce(((t,s)=>(t.push("object"==typeof e[s]?W(e[s]):`${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`),t)),[]).join("&")}K.glass=`\n
              \n \n \n \n
              \n
                \n`,K.input=`\n
                \n \n \n \n
                \n
                  \n`;class X{constructor(){this.settings={url:"https://photon.komoot.io/api/",params:{q:"",limit:10,lang:"en"},langs:["de","it","fr","en"]}}getParameters(e){return e.lang=e.lang.toLowerCase(),{url:this.settings.url,params:{q:e.query,limit:e.limit||this.settings.params.limit,lang:this.settings.langs.includes(e.lang)?e.lang:this.settings.params.lang}}}handleResponse(e){return 0===e.features.length?[]:e.features.map((e=>({lon:e.geometry.coordinates[0],lat:e.geometry.coordinates[1],address:{name:e.properties.name,postcode:e.properties.postcode,city:e.properties.city,state:e.properties.state,country:e.properties.country},original:{formatted:e.properties.name,details:e.properties}})))}}class Y{constructor(e){this.settings={url:"https://nominatim.openstreetmap.org/search",...e,params:{q:"",format:"json",addressdetails:1,limit:10,countrycodes:"",viewbox:"","accept-language":"en-US"}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,format:this.settings.params.format,addressdetails:this.settings.params.addressdetails,limit:e.limit||this.settings.params.limit,countrycodes:e.countrycodes||this.settings.params.countrycodes,viewbox:e.viewbox||this.settings.params.viewbox,"accept-language":e.lang||this.settings.params["accept-language"]}}}handleResponse(e){return 0===e.length?[]:e.map((e=>({lon:e.lon,lat:e.lat,bbox:e.boundingbox,address:{name:e.display_name,road:e.address.road||"",houseNumber:e.address.house_number||"",postcode:e.address.postcode,city:e.address.city||e.address.town,state:e.address.state,country:e.address.country},original:{formatted:e.display_name,details:e.address}})))}}class Z{constructor(){this.settings={url:"https://open.mapquestapi.com/nominatim/v1/search.php",params:{q:"",key:"",format:"json",addressdetails:1,limit:10,countrycodes:"","accept-language":"en-US"}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,key:e.key,format:"json",addressdetails:1,limit:e.limit||this.settings.params.limit,countrycodes:e.countrycodes||this.settings.params.countrycodes,"accept-language":e.lang||this.settings.params["accept-language"]}}}handleResponse(e){return 0===e.length?[]:e.map((e=>({lon:e.lon,lat:e.lat,address:{name:e.address.neighbourhood||"",road:e.address.road||"",postcode:e.address.postcode,city:e.address.city||e.address.town,state:e.address.state,country:e.address.country},original:{formatted:e.display_name,details:e.address}})))}}class ee{constructor(){this.settings={url:"https://dev.virtualearth.net/REST/v1/Locations",callbackName:"jsonp",params:{query:"",key:"",includeNeighborhood:0,maxResults:10}}}getParameters(e){return{url:this.settings.url,callbackName:this.settings.callbackName,params:{query:e.query,key:e.key,includeNeighborhood:e.includeNeighborhood||this.settings.params.includeNeighborhood,maxResults:e.maxResults||this.settings.params.maxResults}}}handleResponse(e){const{resources:t}=e.resourceSets[0];return 0===t.length?[]:t.map((e=>({lon:e.point.coordinates[1],lat:e.point.coordinates[0],address:{name:e.name},original:{formatted:e.address.formattedAddress,details:e.address}})))}}class te{constructor(){this.settings={url:"https://api.opencagedata.com/geocode/v1/json?",params:{q:"",key:"",limit:10,countrycode:"",pretty:1,no_annotations:1}}}getParameters(e){return{url:this.settings.url,params:{q:e.query,key:e.key,limit:e.limit||this.settings.params.limit,countrycode:e.countrycodes||this.settings.params.countrycodes}}}handleResponse(e){return 0===e.results.length?[]:e.results.map((e=>({lon:e.geometry.lng,lat:e.geometry.lat,address:{name:e.components.house_number||"",road:e.components.road||"",postcode:e.components.postcode,city:e.components.city||e.components.town,state:e.components.state,country:e.components.country},original:{formatted:e.formatted,details:e.components}})))}}const se=q.cssClasses;class re{constructor(e,t){this.Base=e,this.layerName=F("geocoder-layer-"),this.layer=new h.default({name:this.layerName,source:new m.default,displayInLayerSwitcher:!1}),this.options=e.options,this.options.provider="string"==typeof this.options.provider?this.options.provider.toLowerCase():this.options.provider,this.provider=this.newProvider(),this.els=t,this.lastQuery="",this.container=this.els.container,this.registeredListeners={mapClick:!1},this.setListeners()}setListeners(){const e=e=>{e.stopPropagation(),V(this.els.control,se.glass.expanded)?this.collapse():this.expand()};this.els.input.addEventListener("keypress",(e=>{const t=e.target.value.trim();(e.key?"Enter"===e.key:e.which?13===e.which:!!e.keyCode&&13===e.keyCode)&&(e.preventDefault(),this.query(t))}),!1),this.els.input.addEventListener("click",(e=>e.stopPropagation()),!1),this.els.input.addEventListener("input",(e=>{0!==e.target.value.trim().length?D(this.els.search,se.hidden):M(this.els.search,se.hidden)}),!1),this.els.search.addEventListener("click",(()=>{this.els.input.focus(),this.query(this.els.input.value)}),!1),this.options.targetType===E&&this.els.button.addEventListener("click",e,!1)}query(e){this.provider||(this.provider=this.newProvider());const t=this.provider.getParameters({query:e,key:this.options.key,lang:this.options.lang,countrycodes:this.options.countrycodes,viewbox:this.options.viewbox,limit:this.options.limit});if(this.lastQuery===e&&this.els.result.firstChild)return;this.lastQuery=e,this.clearResults(),M(this.els.search,se.spin);const s={url:t.url,data:t.params};t.callbackName&&(s.jsonp=!0,s.callbackName=t.callbackName),J(s).then((e=>{this.options.debug&&console.info(e),D(this.els.search,se.spin);const t=this.provider.handleResponse(e);t&&(this.createList(t),this.listenMapClick())})).catch((()=>{D(this.els.search,se.spin);const e=B("li","
                  Error! No internet connection?
                  ");this.els.result.append(e)}))}createList(e){const t=this.els.result;e.forEach((e=>{let s;if(this.options.provider===T)s=`${e.address.name}`;else s=this.addressTemplate(e.address);const r=B("li",`${s}`);r.addEventListener("click",(t=>{t.preventDefault(),this.chosen(e,s,e.address,e.original)}),!1),t.append(r)}))}chosen(e,t,s,r){const n=this.Base.getMap(),o=[Number.parseFloat(e.lon),Number.parseFloat(e.lat)],a=n.getView().getProjection(),i=f.transform(o,"EPSG:4326",a);let{bbox:l}=e;l&&(l=f.transformExtent([parseFloat(l[2]),parseFloat(l[0]),parseFloat(l[3]),parseFloat(l[1])],"EPSG:4326",a));const c={formatted:t,details:s,original:r};if(!1===this.options.keepOpen&&this.clearResults(!0),!0===this.options.preventDefault||!0===this.options.preventMarker)this.Base.dispatchEvent({type:S,address:c,coordinate:i,bbox:l,place:e});else{const t=this.createFeature(i,c);this.Base.dispatchEvent({type:S,address:c,feature:t,coordinate:i,bbox:l,place:e})}!0!==this.options.preventDefault&&!0!==this.options.preventPanning&&(l?n.getView().fit(l,{duration:500}):n.getView().animate({center:i,resolution:this.options.defaultFlyResolution,duration:500}))}createFeature(e){const t=new y.default(new g.default(e));return this.addLayer(),t.setStyle(this.options.featureStyle),t.setId(F("geocoder-ft-")),this.getSource().addFeature(t),t}addressTemplate(e){const t=[];return e.name&&t.push(['{name}'].join("")),(e.road||e.building||e.house_number)&&t.push(['{building} {road} {house_number}'].join("")),(e.city||e.town||e.village)&&t.push(['{postcode} {city} {town} {village}'].join("")),(e.state||e.country)&&t.push(['{state} {country}'].join("")),Q(t.join("
                  "),e)}newProvider(){switch(this.options.provider){case T:return new Y(this.options);case P:return new Z;case N:return new X;case A:return new ee;case I:return new te;default:return this.options.provider}}expand(){D(this.els.input,se.spin),M(this.els.control,se.glass.expanded),window.setTimeout((()=>this.els.input.focus()),100),this.listenMapClick()}collapse(){this.els.input.value="",this.els.input.blur(),M(this.els.search,se.hidden),D(this.els.control,se.glass.expanded),this.clearResults()}listenMapClick(){if(this.registeredListeners.mapClick)return;const e=this,t=this.Base.getMap().getTargetElement();this.registeredListeners.mapClick=!0,t.addEventListener("click",{handleEvent(s){e.clearResults(!0),t.removeEventListener(s.type,this,!1),e.registeredListeners.mapClick=!1}},!1)}clearResults(e){e&&this.options.targetType===E?this.collapse():function(e){for(;e.firstChild;)e.firstChild.remove()}(this.els.result)}getSource(){return this.layer.getSource()}addLayer(){let e=!1;const t=this.Base.getMap();t.getLayers().forEach((t=>{t===this.layer&&(e=!0)})),e||t.addLayer(this.layer)}}class ne extends d.default{constructor(e=j,t={}){let s,r;O("string"==typeof e,"@param `type` should be string!"),O(e===j||e===L,`@param 'type' should be '${j}'\n or '${L}'!`),O("object"==typeof t,"@param `options` should be object!"),R.featureStyle=[new u.default({image:new p.default({scale:.7,src:"//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png"})})];const n=new K(t);if(e===j&&(s=n.els.container),super({element:s,...t}),!(this instanceof ne))return new ne;this.options=function(e,t){const s={};return Object.keys(e).forEach((t=>{Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=e[t])})),Object.keys(t).forEach((e=>{Object.prototype.hasOwnProperty.call(t,e)&&(s[e]=t[e])})),s}(R,t),this.container=s,e===j&&(r=new re(this,n.els),this.layer=r.layer)}getLayer(){return this.layer}getSource(){return this.getLayer().getSource()}setProvider(e){this.options.provider=e}setProviderKey(e){this.options.key=e}}return ne})); //# sourceMappingURL=ol-geocoder.js.map diff --git a/dist/ol-geocoder.js.map b/dist/ol-geocoder.js.map index 8b44057..fdf5104 100644 --- a/dist/ol-geocoder.js.map +++ b/dist/ol-geocoder.js.map @@ -1 +1 @@ -{"version":3,"file":"ol-geocoder.js","sources":["../konstants/index.js","../src/helpers/mix.js","../src/helpers/dom.js","../src/html.js","../src/providers/photon.js","../src/providers/osm.js","../src/providers/mapquest.js","../src/providers/bing.js","../src/providers/opencage.js","../src/helpers/ajax.js","../src/nominatim.js","../src/base.js"],"sourcesContent":["import * as _VARS_ from './vars.json';\n\nexport const VARS = _VARS_;\n\nexport const EVENT_TYPE = {\n ADDRESSCHOSEN: 'addresschosen',\n};\n\nexport const CONTROL_TYPE = {\n NOMINATIM: 'nominatim',\n REVERSE: 'reverse',\n};\n\nexport const TARGET_TYPE = {\n GLASS: 'glass-button',\n INPUT: 'text-input',\n};\n\nexport const FEATURE_SRC = '//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png';\n\nexport const PROVIDERS = {\n OSM: 'osm',\n MAPQUEST: 'mapquest',\n PHOTON: 'photon',\n BING: 'bing',\n OPENCAGE: 'opencage',\n};\n\nexport const DEFAULT_OPTIONS = {\n provider: PROVIDERS.OSM,\n placeholder: 'Search for an address',\n featureStyle: null,\n targetType: TARGET_TYPE.GLASS,\n lang: 'en-US',\n limit: 5,\n keepOpen: false,\n preventDefault: false,\n debug: false,\n};","/**\n * Overwrites obj1's values with obj2's and adds\n * obj2's if non existent in obj1\n * @returns obj3 a new object based on obj1 and obj2\n */\nexport function mergeOptions(obj1, obj2) {\n const obj3 = {};\n\n Object.keys(obj1).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj1, key)) {\n obj3[key] = obj1[key];\n }\n });\n\n Object.keys(obj2).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n obj3[key] = obj2[key];\n }\n });\n\n return obj3;\n}\n\nexport function assert(condition, message = 'Assertion failed') {\n if (!condition) {\n if (typeof Error !== 'undefined') throw new Error(message);\n\n throw message; // Fallback\n }\n}\n\nexport function now() {\n // Polyfill for window.performance.now()\n // @license http://opensource.org/licenses/MIT\n // copyright Paul Irish 2015\n // https://gist.github.com/paulirish/5438650\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n let nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = () => Date.now() - nowOffset;\n }\n\n return window.performance.now();\n}\n\nexport function flyTo(map, coord, duration = 500, resolution = 2.388657133911758) {\n map.getView().animate({\n center: coord,\n resolution: resolution,\n duration: duration,\n });\n}\n\nexport function randomId(prefix) {\n const id = now().toString(36);\n\n return prefix ? prefix + id : id;\n}\n\nexport function isNumeric(str) {\n return /^\\d+$/u.test(str);\n}\n\nexport function isEmpty(str) {\n return !str || str.length === 0;\n}\n\nexport function emptyArray(array) {\n while (array.length) array.pop();\n}\n\nexport function anyMatchInArray(source, target) {\n return source.some((each) => target.includes(each));\n}\n\nexport function everyMatchInArray(arr1, arr2) {\n return arr2.every((each) => arr1.includes(each));\n}\n\nexport function anyItemHasValue(obj, has = false) {\n const keys = Object.keys(obj);\n\n keys.forEach((key) => {\n if (!isEmpty(obj[key])) has = true;\n });\n\n return has;\n}","/* eslint-disable prefer-named-capture-group */\nimport {\n isNumeric\n} from './mix';\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to remove a class.\n */\nexport function addClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => addClass(each, classname));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (!hasClass(element, array[i])) {\n _addClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to add a class.\n */\nexport function removeClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => removeClass(each, classname, timeout));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (hasClass(element, array[i])) {\n _removeClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element} element DOM node.\n * @param {String} classname Classname.\n * @return {Boolean}\n */\nexport function hasClass(element, c) {\n // use native if available\n return element.classList ? element.classList.contains(c) : classRegex(c).test(element.className);\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String} classname Classe.\n */\nexport function toggleClass(element, classname) {\n if (Array.isArray(element)) {\n element.forEach((each) => toggleClass(each, classname));\n\n return;\n }\n\n // use native if available\n if (element.classList) {\n element.classList.toggle(classname);\n } else {\n hasClass(element, classname) ? _removeClass(element, classname) : _addClass(element, classname);\n }\n}\n\n/**\n * Abstraction to querySelectorAll for increased\n * performance and greater usability\n * @param {String} selector\n * @param {Element} context (optional)\n * @param {Boolean} findAll (optional)\n * @return (findAll) {Element} : {Array}\n */\nexport function $(id) {\n id = id[0] === '#' ? id.slice(1, 1 + id.length) : id;\n\n return document.getElementById(id);\n}\n\nexport function isElement(obj) {\n // DOM, Level2\n if ('HTMLElement' in window) {\n return !!obj && obj instanceof HTMLElement;\n }\n\n // Older browsers\n return !!obj && typeof obj === 'object' && obj.nodeType === 1 && !!obj.nodeName;\n}\n\nexport function getAllChildren(node, tag) {\n return [].slice.call(node.getElementsByTagName(tag));\n}\n\nexport function removeAllChildren(node) {\n while (node.firstChild) node.firstChild.remove();\n}\n\nexport function removeAll(collection) {\n let node;\n\n while ((node = collection[0])) node.remove();\n}\n\nexport function getChildren(node, tag) {\n return [].filter.call(node.childNodes, (el) =>\n tag ? el.nodeType === 1 && el.tagName.toLowerCase() === tag : el.nodeType === 1\n );\n}\n\nexport function template(html, row) {\n return html.replace(/\\{\\s*([\\w-]+)\\s*\\}/gu, (htm, key) => {\n const value = row[key] === undefined ? '' : row[key];\n\n return htmlEscape(value);\n });\n}\n\nexport function htmlEscape(str) {\n return String(str)\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n}\n\nexport function createElement(node, html) {\n let elem;\n\n if (Array.isArray(node)) {\n elem = document.createElement(node[0]);\n\n if (node[1].id) elem.id = node[1].id;\n\n if (node[1].classname) elem.className = node[1].classname;\n\n if (node[1].attr) {\n const {\n attr\n } = node[1];\n\n if (Array.isArray(attr)) {\n let i = -1;\n\n while (++i < attr.length) {\n elem.setAttribute(attr[i].name, attr[i].value);\n }\n } else {\n elem.setAttribute(attr.name, attr.value);\n }\n }\n } else {\n elem = document.createElement(node);\n }\n\n elem.innerHTML = html;\n\n const frag = document.createDocumentFragment();\n\n while (elem.childNodes[0]) frag.append(elem.childNodes[0]);\n\n elem.append(frag);\n\n return elem;\n}\n\nfunction classRegex(classname) {\n return new RegExp(`(^|\\\\s+) ${classname} (\\\\s+|$)`, 'u');\n}\n\nfunction _addClass(el, klass, timeout) {\n // use native if available\n if (el.classList) {\n el.classList.add(klass);\n } else {\n el.className = `${el.className} ${klass}`.trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _removeClass(el, klass), timeout);\n }\n}\n\nfunction _removeClass(el, klass, timeout) {\n if (el.classList) {\n el.classList.remove(klass);\n } else {\n el.className = el.className.replace(classRegex(klass), ' ').trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _addClass(el, klass), timeout);\n }\n}","import {\n VARS,\n TARGET_TYPE\n} from '../konstants';\n\nimport {\n createElement\n} from './helpers/dom';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Html\n */\nexport class Html {\n /**\n * @constructor\n * @param {object} options Options.\n */\n constructor(options) {\n this.options = options;\n this.els = this.createControl();\n }\n\n createControl() {\n let container;\n let containerClass;\n let elements;\n\n if (this.options.targetType === TARGET_TYPE.INPUT) {\n containerClass = `${klasses.namespace} ${klasses.inputText.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.input\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.inputText.control}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n } else {\n containerClass = `${klasses.namespace} ${klasses.glass.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.glass\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.glass.control}`),\n button: container.querySelector(`.${klasses.glass.button}`),\n input: container.querySelector(`.${klasses.glass.input}`),\n search: container.querySelector(`.${klasses.glass.search}`),\n result: container.querySelector(`.${klasses.glass.result}`),\n };\n }\n\n // set placeholder from options\n elements.input.placeholder = this.options.placeholder;\n\n return elements;\n }\n}\n\nHtml.glass = `\n
                  \n \n \n \n
                  \n
                    \n`;\n\nHtml.input = `\n
                    \n \n \n \n
                    \n
                      \n`;","/**\n * @class Photon\n */\nexport class Photon {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://photon.komoot.io/api/',\n\n params: {\n q: '',\n limit: 10,\n lang: 'en',\n },\n\n langs: ['de', 'it', 'fr', 'en'],\n };\n }\n\n getParameters(options) {\n options.lang = options.lang.toLowerCase();\n\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n limit: options.limit || this.settings.params.limit,\n\n lang: this.settings.langs.includes(options.lang) ? options.lang : this.settings.params.lang,\n },\n };\n }\n\n handleResponse(results) {\n if (results.features.length === 0) return [];\n\n return results.features.map((result) => ({\n lon: result.geometry.coordinates[0],\n lat: result.geometry.coordinates[1],\n\n address: {\n name: result.properties.name,\n postcode: result.properties.postcode,\n city: result.properties.city,\n state: result.properties.state,\n country: result.properties.country,\n },\n\n original: {\n formatted: result.properties.name,\n details: result.properties,\n },\n }));\n }\n}","/**\n * @class OpenStreet\n */\nexport class OpenStreet {\n /**\n * @constructor\n */\n constructor(options) {\n this.settings = {\n url: 'https://nominatim.openstreetmap.org/search',\n ...options, // Allow custom URL for osm provider https://github.com/Dominique92/ol-geocoder/issues/266\n\n params: {\n q: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n viewbox: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(opt) {\n return {\n url: this.settings.url,\n\n params: {\n q: opt.query,\n format: this.settings.params.format,\n addressdetails: this.settings.params.addressdetails,\n limit: opt.limit || this.settings.params.limit,\n countrycodes: opt.countrycodes || this.settings.params.countrycodes,\n viewbox: opt.viewbox || this.settings.params.viewbox,\n 'accept-language': opt.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n bbox: result.boundingbox,\n\n address: {\n name: result.display_name,\n road: result.address.road || '',\n houseNumber: result.address.house_number || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class MapQuest\n */\nexport class MapQuest {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://open.mapquestapi.com/nominatim/v1/search.php',\n\n params: {\n q: '',\n key: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n format: 'json',\n addressdetails: 1,\n limit: options.limit || this.settings.params.limit,\n countrycodes: options.countrycodes || this.settings.params.countrycodes,\n\n 'accept-language': options.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n\n address: {\n name: result.address.neighbourhood || '',\n road: result.address.road || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class Bing\n */\nexport class Bing {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://dev.virtualearth.net/REST/v1/Locations',\n callbackName: 'jsonp',\n\n params: {\n query: '',\n key: '',\n includeNeighborhood: 0,\n maxResults: 10,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n callbackName: this.settings.callbackName,\n\n params: {\n query: options.query,\n key: options.key,\n\n includeNeighborhood: options.includeNeighborhood || this.settings.params.includeNeighborhood,\n\n maxResults: options.maxResults || this.settings.params.maxResults,\n },\n };\n }\n\n handleResponse(results) {\n const {\n resources\n } = results.resourceSets[0];\n\n if (resources.length === 0) return [];\n\n return resources.map((result) => ({\n lon: result.point.coordinates[1],\n lat: result.point.coordinates[0],\n\n address: {\n name: result.name,\n },\n\n original: {\n formatted: result.address.formattedAddress,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class OpenCage\n */\nexport class OpenCage {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://api.opencagedata.com/geocode/v1/json?',\n\n params: {\n q: '',\n key: '',\n limit: 10,\n countrycode: '',\n pretty: 1,\n no_annotations: 1,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n limit: options.limit || this.settings.params.limit,\n countrycode: options.countrycodes || this.settings.params.countrycodes,\n },\n };\n }\n\n handleResponse(results) {\n if (results.results.length === 0) return [];\n\n return results.results.map((result) => ({\n lon: result.geometry.lng,\n lat: result.geometry.lat,\n\n address: {\n name: result.components.house_number || '',\n road: result.components.road || '',\n postcode: result.components.postcode,\n city: result.components.city || result.components.town,\n state: result.components.state,\n country: result.components.country,\n },\n\n original: {\n formatted: result.formatted,\n details: result.components,\n },\n }));\n }\n}","export function json(obj) {\n return new Promise((resolve, reject) => {\n const url = encodeUrlXhr(obj.url, obj.data);\n const config = {\n method: 'GET',\n mode: 'cors',\n credentials: 'same-origin',\n };\n\n if (obj.jsonp) {\n jsonp(url, obj.callbackName, resolve);\n } else {\n fetch(url, config)\n .then((r) => r.json())\n .then(resolve)\n .catch(reject);\n }\n });\n}\n\nfunction toQueryString(obj) {\n return Object.keys(obj)\n .reduce((acc, k) => {\n acc.push(\n typeof obj[k] === 'object' ?\n toQueryString(obj[k]) :\n `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`\n );\n\n return acc;\n }, [])\n .join('&');\n}\n\nfunction encodeUrlXhr(url, data) {\n if (data && typeof data === 'object') {\n url += (/\\?/u.test(url) ? '&' : '?') + toQueryString(data);\n }\n\n return url;\n}\n\nfunction jsonp(url, key, callback) {\n // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js\n const {\n head\n } = document;\n const script = document.createElement('script');\n // generate minimally unique name for callback function\n const callbackName = `f${Math.round(Math.random() * Date.now())}`;\n\n // set request url\n script.setAttribute(\n 'src',\n // add callback parameter to the url\n // where key is the parameter key supplied\n // and callbackName is the parameter value\n `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}`\n );\n\n // place jsonp callback on window,\n // the script sent by the server should call this\n // function as it was passed as a url parameter\n window[callbackName] = (data) => {\n window[callbackName] = undefined;\n\n // clean up script tag created for request\n setTimeout(() => head.removeChild(script), 0);\n\n // hand data back to the user\n callback(data);\n };\n\n // actually make the request\n head.append(script);\n}","import LayerVector from 'ol/layer/Vector';\nimport SourceVector from 'ol/source/Vector';\nimport Point from 'ol/geom/Point';\nimport Feature from 'ol/Feature';\nimport * as proj from 'ol/proj';\n\nimport {\n VARS,\n TARGET_TYPE,\n PROVIDERS,\n EVENT_TYPE\n} from '../konstants';\n\nimport {\n hasClass,\n addClass,\n removeClass,\n createElement,\n template,\n removeAllChildren,\n} from './helpers/dom';\nimport {\n Photon\n} from './providers/photon';\nimport {\n OpenStreet\n} from './providers/osm';\nimport {\n MapQuest\n} from './providers/mapquest';\nimport {\n Bing\n} from './providers/bing';\nimport {\n OpenCage\n} from './providers/opencage';\nimport {\n randomId\n} from './helpers/mix';\nimport {\n json\n} from './helpers/ajax';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Nominatim\n */\nexport class Nominatim {\n /**\n * @constructor\n * @param {Function} base Base class.\n */\n constructor(base, els) {\n this.Base = base;\n\n this.layerName = randomId('geocoder-layer-');\n this.layer = new LayerVector({\n name: this.layerName,\n source: new SourceVector(),\n displayInLayerSwitcher: false, // Remove search layer from legend https://github.com/Dominique92/ol-geocoder/issues/256\n });\n\n this.options = base.options;\n // provider is either the name of a built-in provider as a string or an\n // object that implements the provider API\n this.options.provider =\n typeof this.options.provider === 'string' ?\n this.options.provider.toLowerCase() :\n this.options.provider;\n this.provider = this.newProvider();\n\n this.els = els;\n this.lastQuery = '';\n this.container = this.els.container;\n this.registeredListeners = {\n mapClick: false\n };\n this.setListeners();\n }\n\n setListeners() {\n let timeout;\n let lastQuery;\n\n const openSearch = (evt) => {\n evt.stopPropagation();\n\n hasClass(this.els.control, klasses.glass.expanded) ? this.collapse() : this.expand();\n };\n const query = (evt) => {\n const value = evt.target.value.trim();\n const hit = evt.key ?\n evt.key === 'Enter' :\n evt.which ?\n evt.which === 13 :\n evt.keyCode ?\n evt.keyCode === 13 :\n false;\n\n if (hit) {\n evt.preventDefault();\n this.query(value);\n }\n };\n const stopBubbling = (evt) => evt.stopPropagation();\n const search = () => {\n this.els.input.focus();\n addClass(this.els.search, klasses.hidden);\n this.query(this.els.input.value);\n };\n const handleValue = (evt) => {\n const value = evt.target.value.trim();\n\n value.length !== 0 ?\n removeClass(this.els.search, klasses.hidden) :\n addClass(this.els.search, klasses.hidden);\n };\n\n this.els.input.addEventListener('keypress', query, false);\n this.els.input.addEventListener('click', stopBubbling, false);\n this.els.input.addEventListener('input', handleValue, false);\n this.els.search.addEventListener('click', search, false);\n\n if (this.options.targetType === TARGET_TYPE.GLASS) {\n this.els.button.addEventListener('click', openSearch, false);\n }\n }\n\n query(q) {\n // lazy provider\n if (!this.provider) {\n this.provider = this.newProvider();\n }\n\n const parameters = this.provider.getParameters({\n query: q,\n key: this.options.key,\n lang: this.options.lang,\n countrycodes: this.options.countrycodes,\n viewbox: this.options.viewbox,\n limit: this.options.limit,\n });\n\n if (this.lastQuery === q && this.els.result.firstChild) return;\n\n this.lastQuery = q;\n this.clearResults();\n addClass(this.els.search, klasses.spin);\n\n const ajax = {\n url: parameters.url,\n data: parameters.params,\n };\n\n if (parameters.callbackName) {\n ajax.jsonp = true;\n ajax.callbackName = parameters.callbackName;\n }\n\n json(ajax)\n .then((res) => {\n // eslint-disable-next-line no-console\n this.options.debug && console.info(res);\n\n removeClass(this.els.search, klasses.spin);\n\n // will be fullfiled according to provider\n const res_ = this.provider.handleResponse(res);\n\n if (res_) {\n this.createList(res_);\n this.listenMapClick();\n }\n })\n .catch(() => {\n removeClass(this.els.search, klasses.spin);\n\n const li = createElement('li', '
                      Error! No internet connection?
                      ');\n\n this.els.result.append(li);\n });\n }\n\n createList(response) {\n const ul = this.els.result;\n\n response.forEach((row) => {\n let addressHtml;\n\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n addressHtml = `${row.address.name}`;\n\n break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n const html = `${addressHtml}`;\n const li = createElement('li', html);\n\n li.addEventListener(\n 'click',\n (evt) => {\n evt.preventDefault();\n this.chosen(row, addressHtml, row.address, row.original);\n },\n false\n );\n\n ul.append(li);\n });\n }\n\n chosen(place, addressHtml, addressObj, addressOriginal) {\n const map = this.Base.getMap();\n const coord_ = [Number.parseFloat(place.lon), Number.parseFloat(place.lat)];\n const projection = map.getView().getProjection();\n const coord = proj.transform(coord_, 'EPSG:4326', projection);\n\n let {\n bbox\n } = place;\n\n if (bbox) {\n bbox = proj.transformExtent(\n // https://nominatim.org/release-docs/latest/api/Output/#boundingbox\n // Requires parseFloat on negative bbox entries\n [parseFloat(bbox[2]), parseFloat(bbox[0]), parseFloat(bbox[3]), parseFloat(bbox[1])], // SNWE -> WSEN\n 'EPSG:4326',\n projection\n );\n }\n\n const address = {\n formatted: addressHtml,\n details: addressObj,\n original: addressOriginal,\n };\n\n this.options.keepOpen === false && this.clearResults(true);\n\n if (this.options.preventDefault === true || this.options.preventMarker === true) {\n // No display change\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n coordinate: coord,\n bbox,\n place,\n });\n } else {\n // Display a marker\n const feature = this.createFeature(coord, address);\n\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n feature,\n coordinate: coord,\n bbox,\n place,\n });\n }\n\n if (this.options.preventDefault !== true && this.options.preventPanning !== true) {\n // Move & zoom to the position\n if (bbox) {\n map.getView().fit(bbox, {\n duration: 500,\n });\n } else {\n map.getView().animate({\n center: coord,\n // ol-geocoder results are too much zoomed -in Dominique92/ol-geocoder#235\n resolution: this.options.defaultFlyResolution || 10, // Meters per pixel\n duration: 500,\n });\n }\n }\n }\n\n createFeature(coord) {\n const feature = new Feature(new Point(coord));\n\n this.addLayer();\n feature.setStyle(this.options.featureStyle);\n feature.setId(randomId('geocoder-ft-'));\n this.getSource().addFeature(feature);\n\n return feature;\n }\n\n addressTemplate(address) {\n const html = [];\n\n if (address.name) {\n html.push(['{name}'].join(''));\n }\n\n if (address.road || address.building || address.house_number) {\n html.push(\n ['{building} {road} {house_number}'].join('')\n );\n }\n\n if (address.city || address.town || address.village) {\n html.push(\n ['{postcode} {city} {town} {village}'].join('')\n );\n }\n\n if (address.state || address.country) {\n html.push(['{state} {country}'].join(''));\n }\n\n return template(html.join('
                      '), address);\n }\n\n newProvider() {\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n return new OpenStreet(this.options);\n case PROVIDERS.MAPQUEST:\n return new MapQuest();\n case PROVIDERS.PHOTON:\n return new Photon();\n case PROVIDERS.BING:\n return new Bing();\n case PROVIDERS.OPENCAGE:\n return new OpenCage();\n\n default:\n return this.options.provider;\n }\n }\n\n expand() {\n removeClass(this.els.input, klasses.spin);\n addClass(this.els.control, klasses.glass.expanded);\n window.setTimeout(() => this.els.input.focus(), 100);\n this.listenMapClick();\n }\n\n collapse() {\n this.els.input.value = '';\n this.els.input.blur();\n addClass(this.els.search, klasses.hidden);\n removeClass(this.els.control, klasses.glass.expanded);\n this.clearResults();\n }\n\n listenMapClick() {\n // already registered\n if (this.registeredListeners.mapClick) return;\n\n const that = this;\n const mapElement = this.Base.getMap().getTargetElement();\n\n this.registeredListeners.mapClick = true;\n\n // one-time fire click\n mapElement.addEventListener(\n 'click', {\n handleEvent(evt) {\n that.clearResults(true);\n mapElement.removeEventListener(evt.type, this, false);\n that.registeredListeners.mapClick = false;\n },\n },\n false\n );\n }\n\n clearResults(collapse) {\n collapse && this.options.targetType === TARGET_TYPE.GLASS ?\n this.collapse() :\n removeAllChildren(this.els.result);\n }\n\n getSource() {\n return this.layer.getSource();\n }\n\n addLayer() {\n let found = false;\n\n const map = this.Base.getMap();\n\n map.getLayers().forEach((layer) => {\n if (layer === this.layer) found = true;\n });\n\n if (!found) map.addLayer(this.layer);\n }\n}","import Control from 'ol/control/Control';\nimport Style from 'ol/style/Style';\nimport Icon from 'ol/style/Icon';\n\nimport {\n CONTROL_TYPE,\n DEFAULT_OPTIONS,\n FEATURE_SRC\n} from '../konstants';\n\nimport {\n Html\n} from './html';\nimport {\n Nominatim\n} from './nominatim';\nimport {\n assert,\n mergeOptions\n} from './helpers/mix';\n\n/**\n * @class Base\n * @extends {ol.control.Control}\n */\nexport default class Base extends Control {\n /**\n * @constructor\n * @param {string} type nominatim|reverse.\n * @param {object} options Options.\n */\n constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) {\n assert(typeof type === 'string', '@param `type` should be string!');\n assert(\n type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE,\n `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}'\n or '${CONTROL_TYPE.REVERSE}'!`\n );\n assert(typeof options === 'object', '@param `options` should be object!');\n\n DEFAULT_OPTIONS.featureStyle = [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ];\n\n let container;\n\n let $nominatim;\n\n const $html = new Html(options);\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n container = $html.els.container;\n }\n\n super({\n element: container,\n ...options, // Allows to add ol.control.Control options (as target:)\n });\n\n if (!(this instanceof Base)) return new Base();\n\n this.options = mergeOptions(DEFAULT_OPTIONS, options);\n this.container = container;\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n $nominatim = new Nominatim(this, $html.els);\n this.layer = $nominatim.layer;\n }\n }\n\n /**\n * @return {ol.layer.Vector} Returns the layer created by this control\n */\n getLayer() {\n return this.layer;\n }\n\n /**\n * @return {ol.source.Vector} Returns the source created by this control\n */\n getSource() {\n return this.getLayer().getSource();\n }\n\n /**\n * Set a new provider\n * @param {String} provider\n */\n setProvider(provider) {\n this.options.provider = provider;\n }\n\n /**\n * Set provider key\n * @param {String} key\n */\n setProviderKey(key) {\n this.options.key = key;\n }\n}"],"names":["VARS","EVENT_TYPE","CONTROL_TYPE","TARGET_TYPE","PROVIDERS","DEFAULT_OPTIONS","provider","placeholder","featureStyle","targetType","lang","limit","keepOpen","preventDefault","debug","assert","condition","message","Error","randomId","prefix","id","window","performance","nowOffset","Date","now","timing","navigationStart","toString","isNumeric","str","test","addClass","element","classname","timeout","Array","isArray","forEach","each","array","split","i","length","hasClass","_addClass","removeClass","_removeClass","c","classList","contains","classRegex","className","template","html","row","replace","htm","key","value","undefined","String","replaceAll","createElement","node","elem","document","attr","setAttribute","name","innerHTML","frag","createDocumentFragment","childNodes","append","RegExp","el","klass","add","trim","setTimeout","remove","klasses","cssClasses","Html","constructor","options","this","els","createControl","container","containerClass","elements","namespace","inputText","containerId","input","control","querySelector","search","result","glass","button","olControl","buttonControlId","inputQueryId","inputSearchId","hidden","icon","Photon","settings","url","params","q","langs","getParameters","toLowerCase","query","includes","handleResponse","results","features","map","lon","geometry","coordinates","lat","address","properties","postcode","city","state","country","original","formatted","details","OpenStreet","format","addressdetails","countrycodes","viewbox","opt","bbox","boundingbox","display_name","road","houseNumber","house_number","town","MapQuest","neighbourhood","Bing","callbackName","includeNeighborhood","maxResults","resources","resourceSets","point","formattedAddress","OpenCage","countrycode","pretty","no_annotations","lng","components","json","obj","Promise","resolve","reject","data","toQueryString","encodeUrlXhr","config","method","mode","credentials","jsonp","callback","head","script","Math","round","random","indexOf","removeChild","fetch","then","r","catch","Object","keys","reduce","acc","k","push","encodeURIComponent","join","Nominatim","base","Base","layerName","layer","LayerVector","source","SourceVector","displayInLayerSwitcher","newProvider","lastQuery","registeredListeners","mapClick","setListeners","openSearch","evt","stopPropagation","expanded","collapse","expand","addEventListener","target","which","keyCode","focus","parameters","firstChild","clearResults","spin","ajax","res","console","info","res_","createList","listenMapClick","li","response","ul","addressHtml","addressTemplate","chosen","place","addressObj","addressOriginal","getMap","coord_","Number","parseFloat","projection","getView","getProjection","coord","proj","transform","transformExtent","preventMarker","dispatchEvent","type","coordinate","feature","createFeature","preventPanning","fit","duration","animate","center","resolution","defaultFlyResolution","Feature","Point","addLayer","setStyle","setId","getSource","addFeature","building","village","blur","that","mapElement","getTargetElement","handleEvent","removeEventListener","removeAllChildren","found","getLayers","Control","$nominatim","Style","image","Icon","scale","src","$html","super","obj1","obj2","obj3","prototype","hasOwnProperty","call","mergeOptions","getLayer","setProvider","setProviderKey"],"mappings":";;;;;;swDAEO,MAAMA,wHAEAC,EACI,gBAGJC,EACA,YADAA,EAEF,UAGEC,EACJ,eADIA,EAEJ,aAKIC,EACN,MADMA,EAED,WAFCA,EAGH,SAHGA,EAIL,OAJKA,EAKD,WAGCC,EAAkB,CAC7BC,SAAUF,EACVG,YAAa,wBACbC,aAAc,KACdC,WAAYN,EACZO,KAAM,QACNC,MAAO,EACPC,UAAU,EACVC,gBAAgB,EAChBC,OAAO,GCdF,SAASC,EAAOC,EAAWC,EAAU,oBAC1C,IAAKD,EAAW,CACd,GAAqB,oBAAVE,MAAuB,MAAM,IAAIA,MAAMD,GAElD,MAAMA,CACP,CACH,CAgCO,SAASE,EAASC,GACv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/mix.js","../src/helpers/dom.js","../src/html.js","../src/helpers/ajax.js","../src/providers/photon.js","../src/providers/osm.js","../src/providers/mapquest.js","../src/providers/bing.js","../src/providers/opencage.js","../src/nominatim.js","../src/base.js"],"sourcesContent":["import * as _VARS_ from './vars.json';\n\nexport const VARS = _VARS_;\n\nexport const EVENT_TYPE = {\n ADDRESSCHOSEN: 'addresschosen',\n};\n\nexport const CONTROL_TYPE = {\n NOMINATIM: 'nominatim',\n REVERSE: 'reverse',\n};\n\nexport const TARGET_TYPE = {\n GLASS: 'glass-button',\n INPUT: 'text-input',\n};\n\nexport const FEATURE_SRC = '//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png';\n\nexport const PROVIDERS = {\n OSM: 'osm',\n MAPQUEST: 'mapquest',\n PHOTON: 'photon',\n BING: 'bing',\n OPENCAGE: 'opencage',\n};\n\nexport const DEFAULT_OPTIONS = {\n provider: PROVIDERS.OSM,\n placeholder: 'Search for an address',\n featureStyle: null,\n targetType: TARGET_TYPE.GLASS,\n lang: 'en-US',\n limit: 5,\n keepOpen: false,\n preventDefault: false,\n preventPanning: false,\n preventMarker: false,\n defaultFlyResolution: 10, // Meters per pixel\n debug: false,\n};","/**\n * Overwrites obj1's values with obj2's and adds\n * obj2's if non existent in obj1\n * @returns obj3 a new object based on obj1 and obj2\n */\nexport function mergeOptions(obj1, obj2) {\n const obj3 = {};\n\n Object.keys(obj1).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj1, key)) {\n obj3[key] = obj1[key];\n }\n });\n\n Object.keys(obj2).forEach((key) => {\n if (Object.prototype.hasOwnProperty.call(obj2, key)) {\n obj3[key] = obj2[key];\n }\n });\n\n return obj3;\n}\n\nexport function assert(condition, message = 'Assertion failed') {\n if (!condition) {\n if (typeof Error !== 'undefined') throw new Error(message);\n\n throw message; // Fallback\n }\n}\n\nexport function now() {\n // Polyfill for window.performance.now()\n // @license http://opensource.org/licenses/MIT\n // copyright Paul Irish 2015\n // https://gist.github.com/paulirish/5438650\n if ('performance' in window === false) {\n window.performance = {};\n }\n\n if ('now' in window.performance === false) {\n let nowOffset = Date.now();\n\n if (performance.timing && performance.timing.navigationStart) {\n nowOffset = performance.timing.navigationStart;\n }\n\n window.performance.now = () => Date.now() - nowOffset;\n }\n\n return window.performance.now();\n}\n\nexport function flyTo(map, coord, duration = 500, resolution = 2.388657133911758) {\n map.getView().animate({\n center: coord,\n resolution: resolution,\n duration: duration,\n });\n}\n\nexport function randomId(prefix) {\n const id = now().toString(36);\n\n return prefix ? prefix + id : id;\n}\n\nexport function isNumeric(str) {\n return /^\\d+$/u.test(str);\n}\n\nexport function isEmpty(str) {\n return !str || str.length === 0;\n}\n\nexport function emptyArray(array) {\n while (array.length) array.pop();\n}\n\nexport function anyMatchInArray(source, target) {\n return source.some((each) => target.includes(each));\n}\n\nexport function everyMatchInArray(arr1, arr2) {\n return arr2.every((each) => arr1.includes(each));\n}\n\nexport function anyItemHasValue(obj, has = false) {\n const keys = Object.keys(obj);\n\n keys.forEach((key) => {\n if (!isEmpty(obj[key])) has = true;\n });\n\n return has;\n}","/* eslint-disable prefer-named-capture-group */\nimport {\n isNumeric\n} from './mix';\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to remove a class.\n */\nexport function addClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => addClass(each, classname));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (!hasClass(element, array[i])) {\n _addClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String|Array} classname Class or array of classes.\n * For example: 'class1 class2' or ['class1', 'class2']\n * @param {Number|undefined} timeout Timeout to add a class.\n */\nexport function removeClass(element, classname, timeout) {\n if (Array.isArray(element)) {\n element.forEach((each) => removeClass(each, classname, timeout));\n\n return;\n }\n\n const array = Array.isArray(classname) ? classname : classname.split(/\\s+/u);\n\n let i = array.length;\n\n while (i--) {\n if (hasClass(element, array[i])) {\n _removeClass(element, array[i], timeout);\n }\n }\n}\n\n/**\n * @param {Element} element DOM node.\n * @param {String} classname Classname.\n * @return {Boolean}\n */\nexport function hasClass(element, c) {\n // use native if available\n return element.classList ? element.classList.contains(c) : classRegex(c).test(element.className);\n}\n\n/**\n * @param {Element|Array} element DOM node or array of nodes.\n * @param {String} classname Classe.\n */\nexport function toggleClass(element, classname) {\n if (Array.isArray(element)) {\n element.forEach((each) => toggleClass(each, classname));\n\n return;\n }\n\n // use native if available\n if (element.classList) {\n element.classList.toggle(classname);\n } else {\n hasClass(element, classname) ? _removeClass(element, classname) : _addClass(element, classname);\n }\n}\n\n/**\n * Abstraction to querySelectorAll for increased\n * performance and greater usability\n * @param {String} selector\n * @param {Element} context (optional)\n * @param {Boolean} findAll (optional)\n * @return (findAll) {Element} : {Array}\n */\nexport function $(id) {\n id = id[0] === '#' ? id.slice(1, 1 + id.length) : id;\n\n return document.getElementById(id);\n}\n\nexport function isElement(obj) {\n // DOM, Level2\n if ('HTMLElement' in window) {\n return !!obj && obj instanceof HTMLElement;\n }\n\n // Older browsers\n return !!obj && typeof obj === 'object' && obj.nodeType === 1 && !!obj.nodeName;\n}\n\nexport function getAllChildren(node, tag) {\n return [].slice.call(node.getElementsByTagName(tag));\n}\n\nexport function removeAllChildren(node) {\n while (node.firstChild) node.firstChild.remove();\n}\n\nexport function removeAll(collection) {\n let node;\n\n while ((node = collection[0])) node.remove();\n}\n\nexport function getChildren(node, tag) {\n return [].filter.call(node.childNodes, (el) =>\n tag ? el.nodeType === 1 && el.tagName.toLowerCase() === tag : el.nodeType === 1\n );\n}\n\nexport function template(html, row) {\n return html.replace(/\\{\\s*([\\w-]+)\\s*\\}/gu, (htm, key) => {\n const value = row[key] === undefined ? '' : row[key];\n\n return htmlEscape(value);\n });\n}\n\nexport function htmlEscape(str) {\n return String(str)\n .replaceAll('&', '&')\n .replaceAll('<', '<')\n .replaceAll('>', '>')\n .replaceAll('\"', '"')\n .replaceAll(\"'\", ''');\n}\n\nexport function createElement(node, html) {\n let elem;\n\n if (Array.isArray(node)) {\n elem = document.createElement(node[0]);\n\n if (node[1].id) elem.id = node[1].id;\n\n if (node[1].classname) elem.className = node[1].classname;\n\n if (node[1].attr) {\n const {\n attr\n } = node[1];\n\n if (Array.isArray(attr)) {\n let i = -1;\n\n while (++i < attr.length) {\n elem.setAttribute(attr[i].name, attr[i].value);\n }\n } else {\n elem.setAttribute(attr.name, attr.value);\n }\n }\n } else {\n elem = document.createElement(node);\n }\n\n elem.innerHTML = html;\n\n const frag = document.createDocumentFragment();\n\n while (elem.childNodes[0]) frag.append(elem.childNodes[0]);\n\n elem.append(frag);\n\n return elem;\n}\n\nfunction classRegex(classname) {\n return new RegExp(`(^|\\\\s+) ${classname} (\\\\s+|$)`, 'u');\n}\n\nfunction _addClass(el, klass, timeout) {\n // use native if available\n if (el.classList) {\n el.classList.add(klass);\n } else {\n el.className = `${el.className} ${klass}`.trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _removeClass(el, klass), timeout);\n }\n}\n\nfunction _removeClass(el, klass, timeout) {\n if (el.classList) {\n el.classList.remove(klass);\n } else {\n el.className = el.className.replace(classRegex(klass), ' ').trim();\n }\n\n if (timeout && isNumeric(timeout)) {\n window.setTimeout(() => _addClass(el, klass), timeout);\n }\n}","import {\n VARS,\n TARGET_TYPE\n} from '../konstants';\n\nimport {\n createElement\n} from './helpers/dom';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Html\n */\nexport class Html {\n /**\n * @constructor\n * @param {object} options Options.\n */\n constructor(options) {\n this.options = options;\n this.els = this.createControl();\n }\n\n createControl() {\n let container;\n let containerClass;\n let elements;\n\n if (this.options.targetType === TARGET_TYPE.INPUT) {\n containerClass = `${klasses.namespace} ${klasses.inputText.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.input\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.inputText.control}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n } else {\n containerClass = `${klasses.namespace} ${klasses.glass.container}`;\n container = createElement(\n ['div', {\n id: VARS.containerId,\n classname: containerClass\n }],\n Html.glass\n );\n elements = {\n container,\n control: container.querySelector(`.${klasses.glass.control}`),\n button: container.querySelector(`.${klasses.glass.button}`),\n input: container.querySelector(`.${klasses.glass.input}`),\n search: container.querySelector(`.${klasses.glass.search}`),\n result: container.querySelector(`.${klasses.glass.result}`),\n };\n }\n\n // set placeholder from options\n elements.input.placeholder = this.options.placeholder;\n\n return elements;\n }\n}\n\nHtml.glass = `\n
                      \n \n \n \n
                      \n
                        \n`;\n\nHtml.input = `\n
                        \n \n \n \n
                        \n
                          \n`;","export function json(obj) {\n return new Promise((resolve, reject) => {\n const url = encodeUrlXhr(obj.url, obj.data);\n const config = {\n method: 'GET',\n mode: 'cors',\n credentials: 'same-origin',\n };\n\n if (obj.jsonp) {\n jsonp(url, obj.callbackName, resolve);\n } else {\n fetch(url, config)\n .then((r) => r.json())\n .then(resolve)\n .catch(reject);\n }\n });\n}\n\nfunction toQueryString(obj) {\n return Object.keys(obj)\n .reduce((acc, k) => {\n acc.push(\n typeof obj[k] === 'object' ?\n toQueryString(obj[k]) :\n `${encodeURIComponent(k)}=${encodeURIComponent(obj[k])}`\n );\n\n return acc;\n }, [])\n .join('&');\n}\n\nfunction encodeUrlXhr(url, data) {\n if (data && typeof data === 'object') {\n url += (/\\?/u.test(url) ? '&' : '?') + toQueryString(data);\n }\n\n return url;\n}\n\nfunction jsonp(url, key, callback) {\n // https://github.com/Fresheyeball/micro-jsonp/blob/master/src/jsonp.js\n const {\n head\n } = document;\n const script = document.createElement('script');\n // generate minimally unique name for callback function\n const callbackName = `f${Math.round(Math.random() * Date.now())}`;\n\n // set request url\n script.setAttribute(\n 'src',\n // add callback parameter to the url\n // where key is the parameter key supplied\n // and callbackName is the parameter value\n `${url + (url.indexOf('?') > 0 ? '&' : '?') + key}=${callbackName}`\n );\n\n // place jsonp callback on window,\n // the script sent by the server should call this\n // function as it was passed as a url parameter\n window[callbackName] = (data) => {\n window[callbackName] = undefined;\n\n // clean up script tag created for request\n setTimeout(() => head.removeChild(script), 0);\n\n // hand data back to the user\n callback(data);\n };\n\n // actually make the request\n head.append(script);\n}","/**\n * @class Photon\n */\nexport default class Photon {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://photon.komoot.io/api/',\n\n params: {\n q: '',\n limit: 10,\n lang: 'en',\n },\n\n langs: ['de', 'it', 'fr', 'en'],\n };\n }\n\n getParameters(options) {\n options.lang = options.lang.toLowerCase();\n\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n limit: options.limit || this.settings.params.limit,\n\n lang: this.settings.langs.includes(options.lang) ? options.lang : this.settings.params.lang,\n },\n };\n }\n\n handleResponse(results) {\n if (results.features.length === 0) return [];\n\n return results.features.map((result) => ({\n lon: result.geometry.coordinates[0],\n lat: result.geometry.coordinates[1],\n\n address: {\n name: result.properties.name,\n postcode: result.properties.postcode,\n city: result.properties.city,\n state: result.properties.state,\n country: result.properties.country,\n },\n\n original: {\n formatted: result.properties.name,\n details: result.properties,\n },\n }));\n }\n}","/**\n * @class OpenStreet\n */\nexport default class OpenStreet {\n /**\n * @constructor\n */\n constructor(options) {\n this.settings = {\n url: 'https://nominatim.openstreetmap.org/search',\n ...options, // Allow custom URL for osm provider https://github.com/Dominique92/ol-geocoder/issues/266\n\n params: {\n q: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n viewbox: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(opt) {\n return {\n url: this.settings.url,\n\n params: {\n q: opt.query,\n format: this.settings.params.format,\n addressdetails: this.settings.params.addressdetails,\n limit: opt.limit || this.settings.params.limit,\n countrycodes: opt.countrycodes || this.settings.params.countrycodes,\n viewbox: opt.viewbox || this.settings.params.viewbox,\n 'accept-language': opt.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n bbox: result.boundingbox,\n\n address: {\n name: result.display_name,\n road: result.address.road || '',\n houseNumber: result.address.house_number || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class MapQuest\n */\nexport default class MapQuest {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://open.mapquestapi.com/nominatim/v1/search.php',\n\n params: {\n q: '',\n key: '',\n format: 'json',\n addressdetails: 1,\n limit: 10,\n countrycodes: '',\n 'accept-language': 'en-US',\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n format: 'json',\n addressdetails: 1,\n limit: options.limit || this.settings.params.limit,\n countrycodes: options.countrycodes || this.settings.params.countrycodes,\n\n 'accept-language': options.lang || this.settings.params['accept-language'],\n },\n };\n }\n\n handleResponse(results) {\n if (results.length === 0) return [];\n\n return results.map((result) => ({\n lon: result.lon,\n lat: result.lat,\n\n address: {\n name: result.address.neighbourhood || '',\n road: result.address.road || '',\n postcode: result.address.postcode,\n city: result.address.city || result.address.town,\n state: result.address.state,\n country: result.address.country,\n },\n\n original: {\n formatted: result.display_name,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class Bing\n */\nexport default class Bing {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://dev.virtualearth.net/REST/v1/Locations',\n callbackName: 'jsonp',\n\n params: {\n query: '',\n key: '',\n includeNeighborhood: 0,\n maxResults: 10,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n callbackName: this.settings.callbackName,\n\n params: {\n query: options.query,\n key: options.key,\n\n includeNeighborhood: options.includeNeighborhood || this.settings.params.includeNeighborhood,\n\n maxResults: options.maxResults || this.settings.params.maxResults,\n },\n };\n }\n\n handleResponse(results) {\n const {\n resources\n } = results.resourceSets[0];\n\n if (resources.length === 0) return [];\n\n return resources.map((result) => ({\n lon: result.point.coordinates[1],\n lat: result.point.coordinates[0],\n\n address: {\n name: result.name,\n },\n\n original: {\n formatted: result.address.formattedAddress,\n details: result.address,\n },\n }));\n }\n}","/**\n * @class OpenCage\n */\nexport default class OpenCage {\n /**\n * @constructor\n */\n constructor() {\n this.settings = {\n url: 'https://api.opencagedata.com/geocode/v1/json?',\n\n params: {\n q: '',\n key: '',\n limit: 10,\n countrycode: '',\n pretty: 1,\n no_annotations: 1,\n },\n };\n }\n\n getParameters(options) {\n return {\n url: this.settings.url,\n\n params: {\n q: options.query,\n key: options.key,\n limit: options.limit || this.settings.params.limit,\n countrycode: options.countrycodes || this.settings.params.countrycodes,\n },\n };\n }\n\n handleResponse(results) {\n if (results.results.length === 0) return [];\n\n return results.results.map((result) => ({\n lon: result.geometry.lng,\n lat: result.geometry.lat,\n\n address: {\n name: result.components.house_number || '',\n road: result.components.road || '',\n postcode: result.components.postcode,\n city: result.components.city || result.components.town,\n state: result.components.state,\n country: result.components.country,\n },\n\n original: {\n formatted: result.formatted,\n details: result.components,\n },\n }));\n }\n}","import LayerVector from 'ol/layer/Vector';\nimport SourceVector from 'ol/source/Vector';\nimport Point from 'ol/geom/Point';\nimport Feature from 'ol/Feature';\nimport * as proj from 'ol/proj';\n\nimport {\n VARS,\n TARGET_TYPE,\n PROVIDERS,\n EVENT_TYPE\n} from '../konstants';\nimport {\n hasClass,\n addClass,\n removeClass,\n createElement,\n template,\n removeAllChildren,\n} from './helpers/dom';\nimport {\n randomId\n} from './helpers/mix';\nimport {\n json\n} from './helpers/ajax';\n\nimport Photon from './providers/photon';\nimport OpenStreet from './providers/osm';\nimport MapQuest from './providers/mapquest';\nimport Bing from './providers/bing';\nimport OpenCage from './providers/opencage';\n\nconst klasses = VARS.cssClasses;\n\n/**\n * @class Nominatim\n */\nexport class Nominatim {\n /**\n * @constructor\n * @param {Function} base Base class.\n */\n constructor(base, els) {\n this.Base = base;\n\n this.layerName = randomId('geocoder-layer-');\n this.layer = new LayerVector({\n name: this.layerName,\n source: new SourceVector(),\n displayInLayerSwitcher: false, // Remove search layer from legend https://github.com/Dominique92/ol-geocoder/issues/256\n });\n\n this.options = base.options;\n // provider is either the name of a built-in provider as a string or an\n // object that implements the provider API\n this.options.provider =\n typeof this.options.provider === 'string' ?\n this.options.provider.toLowerCase() :\n this.options.provider;\n this.provider = this.newProvider();\n\n this.els = els;\n this.lastQuery = '';\n this.container = this.els.container;\n this.registeredListeners = {\n mapClick: false,\n };\n this.setListeners();\n }\n\n setListeners() {\n const openSearch = (evt) => {\n evt.stopPropagation();\n hasClass(this.els.control, klasses.glass.expanded) ? this.collapse() : this.expand();\n };\n const query = (evt) => {\n const value = evt.target.value.trim();\n const hit = evt.key ?\n evt.key === 'Enter' :\n evt.which ?\n evt.which === 13 :\n evt.keyCode ?\n evt.keyCode === 13 :\n false;\n\n if (hit) {\n evt.preventDefault();\n this.query(value);\n }\n };\n const stopBubbling = (evt) => evt.stopPropagation();\n const search = () => {\n this.els.input.focus();\n this.query(this.els.input.value);\n };\n const handleValue = (evt) => {\n const value = evt.target.value.trim();\n\n value.length !== 0 ?\n removeClass(this.els.search, klasses.hidden) :\n addClass(this.els.search, klasses.hidden);\n };\n\n this.els.input.addEventListener('keypress', query, false);\n this.els.input.addEventListener('click', stopBubbling, false);\n this.els.input.addEventListener('input', handleValue, false);\n this.els.search.addEventListener('click', search, false);\n\n if (this.options.targetType === TARGET_TYPE.GLASS) {\n this.els.button.addEventListener('click', openSearch, false);\n }\n }\n\n query(q) {\n // lazy provider\n if (!this.provider) {\n this.provider = this.newProvider();\n }\n\n const parameters = this.provider.getParameters({\n query: q,\n key: this.options.key,\n lang: this.options.lang,\n countrycodes: this.options.countrycodes,\n viewbox: this.options.viewbox,\n limit: this.options.limit,\n });\n\n if (this.lastQuery === q && this.els.result.firstChild) return;\n\n this.lastQuery = q;\n this.clearResults();\n addClass(this.els.search, klasses.spin);\n\n const ajax = {\n url: parameters.url,\n data: parameters.params,\n };\n\n if (parameters.callbackName) {\n ajax.jsonp = true;\n ajax.callbackName = parameters.callbackName;\n }\n\n json(ajax)\n .then((res) => {\n // eslint-disable-next-line no-console\n this.options.debug && console.info(res);\n\n removeClass(this.els.search, klasses.spin);\n\n // will be fullfiled according to provider\n const res_ = this.provider.handleResponse(res);\n\n if (res_) {\n this.createList(res_);\n this.listenMapClick();\n }\n })\n .catch(() => {\n removeClass(this.els.search, klasses.spin);\n\n const li = createElement('li', '
                          Error! No internet connection?
                          ');\n\n this.els.result.append(li);\n });\n }\n\n createList(response) {\n const ul = this.els.result;\n\n response.forEach((row) => {\n let addressHtml;\n\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n addressHtml = `${row.address.name}`;\n\n break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n const html = `${addressHtml}`;\n const li = createElement('li', html);\n\n li.addEventListener(\n 'click',\n (evt) => {\n evt.preventDefault();\n this.chosen(row, addressHtml, row.address, row.original);\n },\n false\n );\n\n ul.append(li);\n });\n }\n\n chosen(place, addressHtml, addressObj, addressOriginal) {\n const map = this.Base.getMap();\n const coord_ = [Number.parseFloat(place.lon), Number.parseFloat(place.lat)];\n const projection = map.getView().getProjection();\n const coord = proj.transform(coord_, 'EPSG:4326', projection);\n\n let {\n bbox\n } = place;\n\n if (bbox) {\n bbox = proj.transformExtent(\n // https://nominatim.org/release-docs/latest/api/Output/#boundingbox\n // Requires parseFloat on negative bbox entries\n [parseFloat(bbox[2]), parseFloat(bbox[0]), parseFloat(bbox[3]), parseFloat(bbox[1])], // SNWE -> WSEN\n 'EPSG:4326',\n projection\n );\n }\n\n const address = {\n formatted: addressHtml,\n details: addressObj,\n original: addressOriginal,\n };\n\n this.options.keepOpen === false && this.clearResults(true);\n\n if (this.options.preventDefault === true || this.options.preventMarker === true) {\n // No display change\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n coordinate: coord,\n bbox,\n place,\n });\n } else {\n // Display a marker\n const feature = this.createFeature(coord, address);\n\n this.Base.dispatchEvent({\n type: EVENT_TYPE.ADDRESSCHOSEN,\n address,\n feature,\n coordinate: coord,\n bbox,\n place,\n });\n }\n\n if (this.options.preventDefault !== true && this.options.preventPanning !== true) {\n // Move & zoom to the position\n if (bbox) {\n map.getView().fit(bbox, {\n duration: 500,\n });\n } else {\n map.getView().animate({\n center: coord,\n // ol-geocoder results are too much zoomed -in Dominique92/ol-geocoder#235\n resolution: this.options.defaultFlyResolution,\n duration: 500,\n });\n }\n }\n }\n\n createFeature(coord) {\n const feature = new Feature(new Point(coord));\n\n this.addLayer();\n feature.setStyle(this.options.featureStyle);\n feature.setId(randomId('geocoder-ft-'));\n this.getSource().addFeature(feature);\n\n return feature;\n }\n\n addressTemplate(address) {\n const html = [];\n\n if (address.name) {\n html.push(['{name}'].join(''));\n }\n\n if (address.road || address.building || address.house_number) {\n html.push(\n ['{building} {road} {house_number}'].join('')\n );\n }\n\n if (address.city || address.town || address.village) {\n html.push(\n ['{postcode} {city} {town} {village}'].join('')\n );\n }\n\n if (address.state || address.country) {\n html.push(['{state} {country}'].join(''));\n }\n\n return template(html.join('
                          '), address);\n }\n\n newProvider() {\n switch (this.options.provider) {\n case PROVIDERS.OSM:\n return new OpenStreet(this.options);\n case PROVIDERS.MAPQUEST:\n return new MapQuest();\n case PROVIDERS.PHOTON:\n return new Photon();\n case PROVIDERS.BING:\n return new Bing();\n case PROVIDERS.OPENCAGE:\n return new OpenCage();\n\n default:\n return this.options.provider;\n }\n }\n\n expand() {\n removeClass(this.els.input, klasses.spin);\n addClass(this.els.control, klasses.glass.expanded);\n window.setTimeout(() => this.els.input.focus(), 100);\n this.listenMapClick();\n }\n\n collapse() {\n this.els.input.value = '';\n this.els.input.blur();\n addClass(this.els.search, klasses.hidden);\n removeClass(this.els.control, klasses.glass.expanded);\n this.clearResults();\n }\n\n listenMapClick() {\n // already registered\n if (this.registeredListeners.mapClick) return;\n\n const that = this;\n const mapElement = this.Base.getMap().getTargetElement();\n\n this.registeredListeners.mapClick = true;\n\n // one-time fire click\n mapElement.addEventListener(\n 'click', {\n handleEvent(evt) {\n that.clearResults(true);\n mapElement.removeEventListener(evt.type, this, false);\n that.registeredListeners.mapClick = false;\n },\n },\n false\n );\n }\n\n clearResults(collapse) {\n collapse && this.options.targetType === TARGET_TYPE.GLASS ?\n this.collapse() :\n removeAllChildren(this.els.result);\n }\n\n getSource() {\n return this.layer.getSource();\n }\n\n addLayer() {\n let found = false;\n\n const map = this.Base.getMap();\n\n map.getLayers().forEach((layer) => {\n if (layer === this.layer) found = true;\n });\n\n if (!found) map.addLayer(this.layer);\n }\n}","import Control from 'ol/control/Control';\nimport Style from 'ol/style/Style';\nimport Icon from 'ol/style/Icon';\n\nimport {\n CONTROL_TYPE,\n DEFAULT_OPTIONS,\n FEATURE_SRC\n} from '../konstants';\n\nimport {\n Html\n} from './html';\nimport {\n Nominatim\n} from './nominatim';\nimport {\n assert,\n mergeOptions\n} from './helpers/mix';\n\n/**\n * @class Base\n * @extends {ol.control.Control}\n */\nexport default class Base extends Control {\n /**\n * @constructor\n * @param {string} type nominatim|reverse.\n * @param {object} options Options.\n */\n constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) {\n assert(typeof type === 'string', '@param `type` should be string!');\n assert(\n type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE,\n `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}'\n or '${CONTROL_TYPE.REVERSE}'!`\n );\n assert(typeof options === 'object', '@param `options` should be object!');\n\n DEFAULT_OPTIONS.featureStyle = [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ];\n\n let container;\n\n let $nominatim;\n\n const $html = new Html(options);\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n container = $html.els.container;\n }\n\n super({\n element: container,\n ...options, // Allows to add ol.control.Control options (as target:)\n });\n\n if (!(this instanceof Base)) return new Base();\n\n this.options = mergeOptions(DEFAULT_OPTIONS, options);\n this.container = container;\n\n if (type === CONTROL_TYPE.NOMINATIM) {\n $nominatim = new Nominatim(this, $html.els);\n this.layer = $nominatim.layer;\n }\n }\n\n /**\n * @return {ol.layer.Vector} Returns the layer created by this control\n */\n getLayer() {\n return this.layer;\n }\n\n /**\n * @return {ol.source.Vector} Returns the source created by this control\n */\n getSource() {\n return this.getLayer().getSource();\n }\n\n /**\n * Set a new provider\n * @param {String} provider\n */\n setProvider(provider) {\n this.options.provider = provider;\n }\n\n /**\n * Set provider key\n * @param {String} key\n */\n setProviderKey(key) {\n this.options.key = key;\n }\n}"],"names":["VARS","EVENT_TYPE","CONTROL_TYPE","TARGET_TYPE","PROVIDERS","DEFAULT_OPTIONS","provider","placeholder","featureStyle","targetType","lang","limit","keepOpen","preventDefault","preventPanning","preventMarker","defaultFlyResolution","debug","assert","condition","message","Error","randomId","prefix","id","window","performance","nowOffset","Date","now","timing","navigationStart","toString","isNumeric","str","test","addClass","element","classname","timeout","Array","isArray","forEach","each","array","split","i","length","hasClass","_addClass","removeClass","_removeClass","c","classList","contains","classRegex","className","template","html","row","replace","htm","key","value","undefined","String","replaceAll","createElement","node","elem","document","attr","setAttribute","name","innerHTML","frag","createDocumentFragment","childNodes","append","RegExp","el","klass","add","trim","setTimeout","remove","klasses","cssClasses","Html","constructor","options","this","els","createControl","container","containerClass","elements","namespace","inputText","containerId","input","control","querySelector","search","result","glass","button","json","obj","Promise","resolve","reject","url","data","toQueryString","encodeUrlXhr","config","method","mode","credentials","jsonp","callback","head","script","callbackName","Math","round","random","indexOf","removeChild","fetch","then","r","catch","Object","keys","reduce","acc","k","push","encodeURIComponent","join","olControl","buttonControlId","inputQueryId","inputSearchId","hidden","icon","Photon","settings","params","q","langs","getParameters","toLowerCase","query","includes","handleResponse","results","features","map","lon","geometry","coordinates","lat","address","properties","postcode","city","state","country","original","formatted","details","OpenStreet","format","addressdetails","countrycodes","viewbox","opt","bbox","boundingbox","display_name","road","houseNumber","house_number","town","MapQuest","neighbourhood","Bing","includeNeighborhood","maxResults","resources","resourceSets","point","formattedAddress","OpenCage","countrycode","pretty","no_annotations","lng","components","Nominatim","base","Base","layerName","layer","LayerVector","source","SourceVector","displayInLayerSwitcher","newProvider","lastQuery","registeredListeners","mapClick","setListeners","openSearch","evt","stopPropagation","expanded","collapse","expand","addEventListener","target","which","keyCode","focus","parameters","firstChild","clearResults","spin","ajax","res","console","info","res_","createList","listenMapClick","li","response","ul","addressHtml","addressTemplate","chosen","place","addressObj","addressOriginal","getMap","coord_","Number","parseFloat","projection","getView","getProjection","coord","proj","transform","transformExtent","dispatchEvent","type","coordinate","feature","createFeature","fit","duration","animate","center","resolution","Feature","Point","addLayer","setStyle","setId","getSource","addFeature","building","village","blur","that","mapElement","getTargetElement","handleEvent","removeEventListener","removeAllChildren","found","getLayers","Control","$nominatim","Style","image","Icon","scale","src","$html","super","obj1","obj2","obj3","prototype","hasOwnProperty","call","mergeOptions","getLayer","setProvider","setProviderKey"],"mappings":";;;;;;swDAEO,MAAMA,wHAEAC,EACI,gBAGJC,EACA,YADAA,EAEF,UAGEC,EACJ,eADIA,EAEJ,aAKIC,EACN,MADMA,EAED,WAFCA,EAGH,SAHGA,EAIL,OAJKA,EAKD,WAGCC,EAAkB,CAC7BC,SAAUF,EACVG,YAAa,wBACbC,aAAc,KACdC,WAAYN,EACZO,KAAM,QACNC,MAAO,EACPC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,qBAAsB,GACtBC,OAAO,GCjBF,SAASC,EAAOC,EAAWC,EAAU,oBAC1C,IAAKD,EAAW,CACd,GAAqB,oBAAVE,MAAuB,MAAM,IAAIA,MAAMD,GAElD,MAAMA,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b/dist/ol-geocoder.min.css @@ -1,6 +1,8 @@ /*! - * ol-geocoder - v4.2.1 + * ol-geocoder - v4.3.0 * A geocoder extension compatible with OpenLayers v7+ & v8+ * https://github.com/Dominique92/ol-geocoder - * Built: Mon Sep 04 2023 16:09:30 GMT+0200 (heure d’été d’Europe centrale) - */.ol-touch .ol-control.gcd-gl-control button{font-size:1.14em}.ol-touch .ol-geocoder.gcd-gl-container{font-size:1.1em}.ol-geocoder.gcd-gl-container{box-sizing:border-box;font-size:.9em;left:.5em;position:absolute;top:4.875em}.ol-geocoder.gcd-gl-container *,.ol-geocoder.gcd-gl-container :after,.ol-geocoder.gcd-gl-container :before{box-sizing:inherit}.ol-geocoder .gcd-gl-control{height:2.1875em;overflow:hidden;transition:width .2s,height .2s;width:2.1875em}.ol-geocoder .gcd-gl-expanded{height:2.1875em;width:15.625em}.ol-geocoder .gcd-gl-input{background-color:#fff;border:1px solid #ccc;color:#222;font-family:inherit;font-size:.875em;left:2.5em;padding:5px;position:absolute;top:.25em;width:14.84375em;z-index:99}.ol-geocoder .gcd-gl-input:focus{border:none;box-shadow:inset 0 0 0 1px #4d90fe,inset 0 0 5px #4d90fe;outline:none}.ol-geocoder .gcd-gl-search{background-color:transparent;border:none;cursor:pointer;display:inline-block;height:100%;line-height:1.4;outline:0;position:absolute;right:0;top:0;width:1.5625em;z-index:100}.ol-geocoder .gcd-gl-search:after{color:#333;content:"\2386";cursor:pointer;display:inline-block;font-size:1.5em}.ol-geocoder .gcd-gl-btn{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAFcBAMAAAB2OBsfAAAAGFBMVEXu7u7///8AAAAoKCh8fHzKysqlpaVSUlKH5Q7jAAAKM0lEQVR42u2dSVsbORCGW2aSuUrTi69Mt5crOAtX7CHJNSaBuaY9CVzHTjL8/cEYDEilpdWqdvmJdGseu/RS1lL6JFUnYlN4sinUHyNuxI24ETfiRtyIG3EjLonHJGH3fyH+GHEjbsSNuBE34kbciBtxd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EjbsSNuBG348f9iXcjbsSNuBE34kbciBtxI25UIONqIuJG3IgbcSNuxI24ETcqkDE830vc/wE4HweKeBzDmAAAAABJRU5ErkJggg==");background-position:50%;background-repeat:no-repeat;background-size:20px;height:1.5625em;left:.125em;position:absolute;top:.125em;width:1.5625em}.ol-geocoder ul.gcd-gl-result{background-color:#fff;border-radius:4px;border-top:none;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 1px 7px rgba(0,0,0,.8);left:2em;list-style:none;margin:0;max-height:18.75em;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;top:2.1875em;transition:max-height .3s ease-in;white-space:normal;width:16.25em}.ol-geocoder ul.gcd-gl-result>li{border-bottom:1px solid #eee;line-height:.875rem;overflow:hidden;padding:0;width:100%}.ol-geocoder ul.gcd-gl-result>li>a{display:block;padding:3px 5px;text-decoration:none}.ol-geocoder ul.gcd-gl-result>li>a:hover{background-color:#d4d4d4}.ol-geocoder ul.gcd-gl-result>li:nth-child(odd){background-color:#e0ffe0}.ol-geocoder ul.gcd-gl-result:empty{display:none}.ol-geocoder.gcd-txt-container{box-sizing:border-box;height:4.375em;left:calc(50% - 12.5em);position:absolute;top:.5em;width:25em}.ol-geocoder.gcd-txt-container *,.ol-geocoder.gcd-txt-container :after,.ol-geocoder.gcd-txt-container :before{box-sizing:inherit}.ol-geocoder .gcd-txt-control{background-color:#fff;border:1px solid #ccc;height:4.375em;overflow:hidden;position:relative;width:100%}.ol-geocoder .gcd-txt-input{background-color:transparent;border:none;font-family:inherit;font-size:.875em;height:100%;left:0;padding:5px 30px 5px 40px;position:absolute;text-indent:6px;top:0;width:100%;z-index:99}.ol-geocoder .gcd-txt-input:focus{box-shadow:inset 0 0 0 1px #4d90fe,inset 0 0 6px #4d90fe;outline:none}.ol-geocoder .gcd-txt-search{background-color:transparent;border:none;cursor:pointer;display:inline-block;height:100%;line-height:100%;outline:0;position:absolute;right:0;top:0;vertical-align:middle;width:2.5em;z-index:100}.ol-geocoder .gcd-txt-search:after{color:#333;content:"\2386";cursor:pointer;display:inline-block;font-size:2em}.ol-geocoder .gcd-txt-glass{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='%23333' d='m29.156 29.961-.709.709a2.006 2.006 0 0 1-2.838 0l-5.676-5.674c-.656-.658-.729-1.644-.281-2.412l-3.104-3.102a9.975 9.975 0 0 1-5.965 1.979C5.043 21.461.552 16.97.552 11.43S5.043 1.398 10.583 1.398c5.541 0 10.031 4.491 10.031 10.032 0 2.579-.98 4.923-2.58 6.7l3.035 3.035c.768-.447 1.754-.375 2.41.283l5.676 5.674c.784.785.784 2.056.001 2.839zM18.088 11.389a7.524 7.524 0 0 0-7.524-7.523 7.523 7.523 0 1 0-.001 15.046 7.525 7.525 0 0 0 7.525-7.523z'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:1.38889em;display:inline-block;height:100%;left:0;position:absolute;top:0;width:2.5em;z-index:100}.ol-geocoder ul.gcd-txt-result{background-color:#fff;border-radius:4px;border-top:none;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 1px 7px rgba(0,0,0,.8);left:0;list-style:none;margin:0;max-height:18.75em;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;top:4.575em;transition:max-height .3s ease-in;white-space:normal;width:25em}.ol-geocoder ul.gcd-txt-result>li{border-bottom:1px solid #eee;line-height:.875rem;overflow:hidden;padding:0;width:100%}.ol-geocoder ul.gcd-txt-result>li>a{display:block;padding:3px 5px;text-decoration:none}.ol-geocoder ul.gcd-txt-result>li>a:hover{background-color:#d4d4d4}.ol-geocoder ul.gcd-txt-result>li:nth-child(odd){background-color:#e0ffe0}.ol-geocoder ul.gcd-txt-result:empty{display:none}.ol-geocoder .gcd-hidden{opacity:0;visibility:hidden}.ol-geocoder .gcd-pseudo-rotate:after{animation:spin .7s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.gcd-address,.gcd-road{color:#333;font-size:.875em;font-weight:500}.gcd-city{font-weight:400}.gcd-city,.gcd-country{color:#333;font-size:.75em}.gcd-country{font-weight:lighter} \ No newline at end of file + * Built: Tue Sep 05 2023 21:03:57 GMT+0200 (heure d’été d’Europe centrale) + */ + + .ol-touch .ol-control.gcd-gl-control button{font-size:1.14em}.ol-touch .ol-geocoder.gcd-gl-container{font-size:1.1em}.ol-geocoder.gcd-gl-container{box-sizing:border-box;font-size:.9em;left:.5em;position:absolute;top:4.875em}.ol-geocoder.gcd-gl-container *,.ol-geocoder.gcd-gl-container :after,.ol-geocoder.gcd-gl-container :before{box-sizing:inherit}.ol-geocoder .gcd-gl-control{height:2.1875em;overflow:hidden;transition:width .2s,height .2s;width:2.1875em}.ol-geocoder .gcd-gl-expanded{height:2.1875em;width:15.625em}.ol-geocoder .gcd-gl-input{background-color:#fff;border:1px solid #ccc;color:#222;font-family:inherit;font-size:.875em;left:2.5em;padding:5px;position:absolute;top:.25em;width:14.84375em;z-index:99}.ol-geocoder .gcd-gl-input:focus{border:none;box-shadow:inset 0 0 0 1px #4d90fe,inset 0 0 5px #4d90fe;outline:none}.ol-geocoder .gcd-gl-search{background-color:transparent;border:none;cursor:pointer;display:inline-block;height:100%;line-height:1.4;outline:0;position:absolute;right:0;top:0;width:1.5625em;z-index:100}.ol-geocoder .gcd-gl-search:after{color:#333;content:"\2386";cursor:pointer;display:inline-block;font-size:1.5em}.ol-geocoder .gcd-gl-btn{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAAFcBAMAAAB2OBsfAAAAGFBMVEXu7u7///8AAAAoKCh8fHzKysqlpaVSUlKH5Q7jAAAKM0lEQVR42u2dSVsbORCGW2aSuUrTi69Mt5crOAtX7CHJNSaBuaY9CVzHTjL8/cEYDEilpdWqdvmJdGseu/RS1lL6JFUnYlN4sinUHyNuxI24ETfiRtyIG3EjLonHJGH3fyH+GHEjbsSNuBE34kbciBtxd44bw/OIG3EjbsSNuBE34kbcP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E34kbciBtxI25UIONqIuJG3IgbcSNuxI24ETcqkDE830vc/wE4HweKeBzDmAAAAABJRU5ErkJggg==");background-position:50%;background-repeat:no-repeat;background-size:20px;height:1.5625em;left:.125em;position:absolute;top:.125em;width:1.5625em}.ol-geocoder ul.gcd-gl-result{background-color:#fff;border-radius:4px;border-top:none;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 1px 7px rgba(0,0,0,.8);left:2em;list-style:none;margin:0;max-height:18.75em;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;top:2.1875em;transition:max-height .3s ease-in;white-space:normal;width:16.25em}.ol-geocoder ul.gcd-gl-result>li{border-bottom:1px solid #eee;line-height:.875rem;overflow:hidden;padding:0;width:100%}.ol-geocoder ul.gcd-gl-result>li>a{display:block;padding:3px 5px;text-decoration:none}.ol-geocoder ul.gcd-gl-result>li>a:hover{background-color:#d4d4d4}.ol-geocoder ul.gcd-gl-result>li:nth-child(odd){background-color:#e0ffe0}.ol-geocoder ul.gcd-gl-result:empty{display:none}.ol-geocoder.gcd-txt-container{box-sizing:border-box;height:4.375em;left:calc(50% - 12.5em);position:absolute;top:.5em;width:25em}.ol-geocoder.gcd-txt-container *,.ol-geocoder.gcd-txt-container :after,.ol-geocoder.gcd-txt-container :before{box-sizing:inherit}.ol-geocoder .gcd-txt-control{background-color:#fff;border:1px solid #ccc;height:4.375em;overflow:hidden;position:relative;width:100%}.ol-geocoder .gcd-txt-input{background-color:transparent;border:none;font-family:inherit;font-size:.875em;height:100%;left:0;padding:5px 30px 5px 40px;position:absolute;text-indent:6px;top:0;width:100%;z-index:99}.ol-geocoder .gcd-txt-input:focus{box-shadow:inset 0 0 0 1px #4d90fe,inset 0 0 6px #4d90fe;outline:none}.ol-geocoder .gcd-txt-search{background-color:transparent;border:none;cursor:pointer;display:inline-block;height:100%;line-height:100%;outline:0;position:absolute;right:0;top:0;vertical-align:middle;width:2.5em;z-index:100}.ol-geocoder .gcd-txt-search:after{color:#333;content:"\2386";cursor:pointer;display:inline-block;font-size:2em}.ol-geocoder .gcd-txt-glass{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cpath fill='%23333' d='m29.156 29.961-.709.709a2.006 2.006 0 0 1-2.838 0l-5.676-5.674c-.656-.658-.729-1.644-.281-2.412l-3.104-3.102a9.975 9.975 0 0 1-5.965 1.979C5.043 21.461.552 16.97.552 11.43S5.043 1.398 10.583 1.398c5.541 0 10.031 4.491 10.031 10.032 0 2.579-.98 4.923-2.58 6.7l3.035 3.035c.768-.447 1.754-.375 2.41.283l5.676 5.674c.784.785.784 2.056.001 2.839zM18.088 11.389a7.524 7.524 0 0 0-7.524-7.523 7.523 7.523 0 1 0-.001 15.046 7.525 7.525 0 0 0 7.525-7.523z'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:1.38889em;display:inline-block;height:100%;left:0;position:absolute;top:0;width:2.5em;z-index:100}.ol-geocoder ul.gcd-txt-result{background-color:#fff;border-radius:4px;border-top:none;border-top-left-radius:0;border-top-right-radius:0;box-shadow:0 1px 7px rgba(0,0,0,.8);left:0;list-style:none;margin:0;max-height:18.75em;overflow-x:hidden;overflow-y:auto;padding:0;position:absolute;top:4.575em;transition:max-height .3s ease-in;white-space:normal;width:25em}.ol-geocoder ul.gcd-txt-result>li{border-bottom:1px solid #eee;line-height:.875rem;overflow:hidden;padding:0;width:100%}.ol-geocoder ul.gcd-txt-result>li>a{display:block;padding:3px 5px;text-decoration:none}.ol-geocoder ul.gcd-txt-result>li>a:hover{background-color:#d4d4d4}.ol-geocoder ul.gcd-txt-result>li:nth-child(odd){background-color:#e0ffe0}.ol-geocoder ul.gcd-txt-result:empty{display:none}.ol-geocoder .gcd-hidden{opacity:0;visibility:hidden}.ol-geocoder .gcd-pseudo-rotate:after{animation:spin .7s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.gcd-address,.gcd-road{color:#333;font-size:.875em;font-weight:500}.gcd-city{font-weight:400}.gcd-city,.gcd-country{color:#333;font-size:.75em}.gcd-country{font-weight:lighter} \ No newline at end of file diff --git a/examples/control-glass.html b/examples/control-glass.html index 4595cd6..54087a8 100644 --- a/examples/control-glass.html +++ b/examples/control-glass.html @@ -7,7 +7,7 @@ - +