diff --git a/README.md b/README.md index 0650106..e30ed85 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,16 @@

-A geocoder extension compatible with OpenLayers v7 & v8 (Tested with all versions from v6.15.1 to v8.0.0). +A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x ![geocoder anim](https://raw.githubusercontent.com/Dominique92/ol-geocoder/screenshots/images/anim.gif) ## Demo -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) +You can see +* a [demo of searching in nominatim/OSM](http://dominique92.github.io/ol-geocoder/examples/control-nominatim.html) +* a [jsFiddle](http://jsfiddle.net/jonataswalker/c4qv9afb/) if you prefer. +* a [demo of searching in proton provider using a glass button](http://dominique92.github.io/ol-geocoder/examples/control-glass.html) +* 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: @@ -33,6 +35,13 @@ For an example of defining and using a custom provider see [`examples/custom-pro Custom providers must implement the following methods: +## What's new in 4.3.1 ? +* [#102](https://github.com/Dominique92/ol-geocoder/issues/102) Low-resolution icon appears blurry in HiDPI screens +* [#198](https://github.com/Dominique92/ol-geocoder/issues/198) Add option for HTML label +* [#206](https://github.com/Dominique92/ol-geocoder/issues/206) Is there a way to get keyboard return event to pick top choice in dropdown? +* [#236](https://github.com/Dominique92/ol-geocoder/issues/236) Some 404 errors, unable to access content +* [#250](https://github.com/Dominique92/ol-geocoder/issues/250) Warning when using ol-geocoder from the CDN + #### `getParameters(options)` * `options` `{Object}` * `query` Search string entered by the user; @@ -48,7 +57,7 @@ Custom providers must implement the following methods: ##### CDN hosted - [jsDelivr](https://www.jsdelivr.com/package/npm/ol-geocoder) Load CSS and Javascript: ```HTML - + ``` @@ -62,8 +71,8 @@ Load CSS and Javascript: ##### Github pages hosted Load CSS and Javascript: ```HTML - - + + ``` ##### Self hosted @@ -107,7 +116,7 @@ geocoder.on('addresschosen', (evt) => { * `provider` : `'osm'` (default), `'mapquest'`, `'photon'`, `'pelias'`, `'bing'`, `'opencage'`, custom provider instance; Your preferable provider; * `url` : `'https://nominatim.openstreetmap.org/search''`; API provider url; * `key` : `''`; API Key if required; - * `label` : `label to be display in the top of the input div; + * `label` : `''`; Label to display at top of input div; * `placeholder` : `'Search for an address'`; Placeholder for text input; * `targetType` : `'glass-button'`; Can also be `'text-input'`; * `featureStyle` : `ol.style.Style`; Feature style; @@ -153,6 +162,54 @@ geocoder.on('addresschosen', function(evt) { }); ``` +## Text input customisation +You can customize the text input control using the js parameters to +* Add a label inside the input field +* Attach the control out of the map +* One touch position access (avoid the 5 positions choice) + +See the [demo](http://dominique92.github.io/ol-geocoder/examples/index.html) + +## Glass button customisation +You can customize the glass button using css (to include after ol-geocoder.css) +For example : +```css +/* Change the button position */ +.ol-geocoder.gcd-gl-container { + position: initial; + float: left; + height: 26.75px; + width: 26.75px; + margin: 2px !important; +} +.ol-geocoder .gcd-gl-btn { + position: initial; + height: 24.75px; + width: 24.75px; +} +/* Customise the button aspect */ +.ol-geocoder .gcd-gl-btn:after { + content: "\1F50E"; /* Inverse loop */ + font-size: 15px; +} +/* Don't fotget to change the position of the input & result fields */ +.ol-geocoder .gcd-gl-expanded { + overflow: visible; +} +.ol-geocoder .gcd-gl-input { + top: 30px; + left: 1px; +} +.ol-geocoder .gcd-gl-search { + top: 28px; + left: 175px; +} +.ol-geocoder .gcd-gl-result { + top: 61px !important; + left: 66px !important; +} +``` + # Maintenance takeover I would like to thank you @jonataswalker & @kirtandesai and the entire development team for the fantastic work done so far creating and maintaining this project. As they request a new maintainer, I will assume it within the core goals and values of the project. diff --git a/build/build-css.js b/build/build-css.js index ae50070..6406d34 100644 --- a/build/build-css.js +++ b/build/build-css.js @@ -12,14 +12,14 @@ const autoprefixer = require('autoprefixer'); const postcss = require('postcss'); const postcssReport = require('postcss-reporter'); const cssnano = require('cssnano'); -const pkg = require('../package.json'); +const pkg = require('../package.json'); // Convert CommonJS module into ES module const banner = readFileSync('./build/banner.js', 'utf-8') .replace('{name}', pkg.name) .replace('{description}', pkg.description) .replace('{homepage}', pkg.homepage) .replace('{version}', pkg.version) - .replace('{time}', new Date()); + .replace('{time}', new Date().toLocaleString()); sass.render({ file: './src/sass/main.scss', diff --git a/build/config.js b/build/config.js index 48dbe13..394f774 100644 --- a/build/config.js +++ b/build/config.js @@ -6,7 +6,7 @@ import commonjs from '@rollup/plugin-commonjs'; import json from '@rollup/plugin-json'; import { terser -} from 'rollup-plugin-terser'; +} from 'rollup-plugin-terser'; // Rollup plugin to minify generated es bundle const pkg = JSON.parse(readFileSync('./package.json', 'utf-8')); const external = Object.keys(pkg.dependencies); @@ -33,7 +33,7 @@ const banner = readFileSync('./build/banner.js', 'utf-8') .replace('{description}', pkg.description) .replace('{homepage}', pkg.homepage) .replace('{version}', pkg.version) - .replace('{time}', new Date()); + .replace('{time}', new Date().toLocaleString()); export default [{ external, diff --git a/dist/ol-geocoder-debug.js b/dist/ol-geocoder-debug.js index 63771e7..2bc1eda 100644 --- a/dist/ol-geocoder-debug.js +++ b/dist/ol-geocoder-debug.js @@ -1,8 +1,8 @@ /*! - * ol-geocoder - v4.3.1-dev - * A geocoder extension compatible with OpenLayers v7+ & v8+ + * ol-geocoder - v4.3.1 + * A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x * https://github.com/Dominique92/ol-geocoder - * Built: Wed Sep 13 2023 20:58:26 GMT+0200 (heure d’été d’Europe centrale) + * Built: 15/09/2023 16:57:41 */ @@ -1157,14 +1157,14 @@ * @param {string} type nominatim|reverse. * @param {object} options Options. */ - constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) { + constructor(type = CONTROL_TYPE.NOMINATIM, opt) { assert(typeof type === 'string', '@param `type` should be string!'); assert( type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE, `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}' or '${CONTROL_TYPE.REVERSE}'!` ); - options = { + const options = { ...DEFAULT_OPTIONS, featureStyle: [ new Style__default["default"]({ @@ -1174,13 +1174,11 @@ }) }), ], - ...options, - }; + ...opt, + }; let container; - let $nominatim; - const $html = new Html(options); if (type === CONTROL_TYPE.NOMINATIM) { diff --git a/dist/ol-geocoder-debug.js.map b/dist/ol-geocoder-debug.js.map index d489bd8..8633b44 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/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 label: '',\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};","export 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 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 label: container.querySelector(`.${klasses.inputText.label}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n elements.label.innerHTML = this.options.label;\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`;","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 break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n if (response.length == 1) {\n this.chosen(row, addressHtml, row.address, row.original);\n } else {\n const li = createElement('li', `${addressHtml}`);\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\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} 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 options = {\n ...DEFAULT_OPTIONS,\n featureStyle: [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ],\n ...options,\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 = 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;EACtB,EAAE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C3B,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 label: '',\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};","export 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 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 default 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 label: container.querySelector(`.${klasses.inputText.label}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n elements.label.innerHTML = this.options.label;\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`;","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 default 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 break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n if (response.length == 1) {\n this.chosen(row, addressHtml, row.address, row.original);\n } else {\n const li = createElement('li', `${addressHtml}`);\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\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 Html from './html';\nimport Nominatim from './nominatim';\nimport {\n assert,\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, opt) {\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 const options = {\n ...DEFAULT_OPTIONS,\n featureStyle: [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ],\n ...opt,\n };\n\n let container;\n let $nominatim;\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 = 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;EACtB,EAAE,MAAM,EAAE,QAAQ;EAClB,EAAE,IAAI,EAAE,MAAM;EACd,EAAE,QAAQ,EAAE,UAAU;EACtB,CAAC,CAAC;AACF;EACO,MAAM,eAAe,GAAG;EAC/B,EAAE,QAAQ,EAAE,SAAS,CAAC,GAAG;EACzB,EAAE,KAAK,EAAE,EAAE;EACX,EAAE,WAAW,EAAE,uBAAuB;EACtC,EAAE,YAAY,EAAE,IAAI;EACpB,EAAE,UAAU,EAAE,WAAW,CAAC,KAAK;EAC/B,EAA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CAAC,CAAC;AACP;EACA,IAAI,IAAI,EAAE,IAAI,YAAY,IAAI,CAAC,EAAE,OAAO,IAAI,IAAI,EAAE,CAAC;AACnD;EACA,IAAI,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;EAC3B,IAAI,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;AAC/B;EACA,IAAI,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 d863526..ccb8bfb 100644 --- a/dist/ol-geocoder.css +++ b/dist/ol-geocoder.css @@ -1,8 +1,8 @@ /*! - * ol-geocoder - v4.3.1-dev - * A geocoder extension compatible with OpenLayers v7+ & v8+ + * ol-geocoder - v4.3.1 + * A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x * https://github.com/Dominique92/ol-geocoder - * Built: Wed Sep 13 2023 20:58:28 GMT+0200 (heure d’été d’Europe centrale) + * Built: 15/09/2023 16:57:43 */ .ol-touch .ol-control.gcd-gl-control button { @@ -74,7 +74,8 @@ width: 1.5625em; height: 1.5625em; top: 0.125em; - left: 0.125em; } + left: 0.125em; + cursor: pointer; } .ol-geocoder .gcd-gl-btn:after { content: "\1F50D"; } diff --git a/dist/ol-geocoder.js b/dist/ol-geocoder.js index bef57f7..0cf56d6 100644 --- a/dist/ol-geocoder.js +++ b/dist/ol-geocoder.js @@ -1,8 +1,8 @@ /*! - * ol-geocoder - v4.3.1-dev - * A geocoder extension compatible with OpenLayers v7+ & v8+ + * ol-geocoder - v4.3.1 + * A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x * https://github.com/Dominique92/ol-geocoder - * Built: Wed Sep 13 2023 20:58:26 GMT+0200 (heure d’été d’Europe centrale) + * Built: 15/09/2023 16:57:41 */ -!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-label",$="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",label:"gcd-txt-label",input:"gcd-txt-input",search:"gcd-txt-search",icon:"gcd-txt-glass",result:"gcd-txt-result"}},S={containerId:b,buttonControlId:v,inputQueryId:w,inputLabelId:x,inputSearchId:$,cssClasses:k};const q=Object.freeze({__proto__:null,containerId:b,buttonControlId:v,inputQueryId:w,inputLabelId:x,inputSearchId:$,cssClasses:k,default:S}),L="addresschosen",C="nominatim",j="reverse",E="glass-button",T="text-input",I="osm",N="mapquest",P="photon",A="bing",R="opencage",F={provider:I,label:"",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 _(e,t="Assertion failed"){if(!e){if("undefined"!=typeof Error)throw new Error(t);throw t}}function M(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 O(e){return/^\d+$/u.test(e)}function D(e,t,s){if(Array.isArray(e))return void e.forEach((e=>D(e,t)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)Q(e,r[n])||z(e,r[n],s)}function V(e,t,s){if(Array.isArray(e))return void e.forEach((e=>V(e,t,s)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)Q(e,r[n])&&H(e,r[n],s)}function Q(e,t){return e.classList?e.classList.contains(t):G(t).test(e.className)}function B(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 U(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(;++eH(e,t)),s)}function H(e,t,s){e.classList?e.classList.remove(t):e.className=e.className.replace(G(t)," ").trim(),s&&O(s)&&window.setTimeout((()=>z(e,t)),s)}const K=q.cssClasses;class J{constructor(e){this.options=e,this.els=this.createControl()}createControl(){let e,t,s;return this.options.targetType===T?(t=`${K.namespace} ${K.inputText.container}`,e=U(["div",{id:q.containerId,classname:t}],J.input),s={container:e,control:e.querySelector(`.${K.inputText.control}`),label:e.querySelector(`.${K.inputText.label}`),input:e.querySelector(`.${K.inputText.input}`),search:e.querySelector(`.${K.inputText.search}`),result:e.querySelector(`.${K.inputText.result}`)},s.label.innerHTML=this.options.label):(t=`${K.namespace} ${K.glass.container}`,e=U(["div",{id:q.containerId,classname:t}],J.glass),s={container:e,control:e.querySelector(`.${K.glass.control}`),button:e.querySelector(`.${K.glass.button}`),input:e.querySelector(`.${K.glass.input}`),search:e.querySelector(`.${K.glass.search}`),result:e.querySelector(`.${K.glass.result}`)}),s.input.placeholder=this.options.placeholder,s}}function W(e){return new Promise(((t,s)=>{const r=function(e,t){t&&"object"==typeof t&&(e+=(/\?/u.test(e)?"&":"?")+X(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 X(e){return Object.keys(e).reduce(((t,s)=>(t.push("object"==typeof e[s]?X(e[s]):`${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`),t)),[]).join("&")}J.glass=`\n
          \n \n \n \n
          \n
            \n`,J.input=`\n
            \n \n \n \n \n
            \n
              \n`;class Y{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 Z{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 ee{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 te{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 se{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 re=q.cssClasses;class ne{constructor(e,t){this.Base=e,this.layerName=M("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(),Q(this.els.control,re.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?V(this.els.search,re.hidden):D(this.els.search,re.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(),D(this.els.search,re.spin);const s={url:t.url,data:t.params};t.callbackName&&(s.jsonp=!0,s.callbackName=t.callbackName),W(s).then((e=>{this.options.debug&&console.info(e),V(this.els.search,re.spin);const t=this.provider.handleResponse(e);t&&(this.createList(t),this.listenMapClick())})).catch((()=>{V(this.els.search,re.spin);const e=U("li","
              Error! No internet connection?
              ");this.els.result.append(e)}))}createList(e){const t=this.els.result;e.forEach((s=>{let r;if(this.options.provider===I)r=`${s.address.name}`;else r=this.addressTemplate(s.address);if(1==e.length)this.chosen(s,r,s.address,s.original);else{const e=U("li",`${r}`);e.addEventListener("click",(e=>{e.preventDefault(),this.chosen(s,r,s.address,s.original)}),!1),t.append(e)}}))}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:L,address:c,coordinate:i,bbox:l,place:e});else{const t=this.createFeature(i,c);this.Base.dispatchEvent({type:L,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(M("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("")),B(t.join("
              "),e)}newProvider(){switch(this.options.provider){case I:return new Z(this.options);case N:return new ee;case P:return new Y;case A:return new te;case R:return new se;default:return this.options.provider}}expand(){V(this.els.input,re.spin),D(this.els.control,re.glass.expanded),window.setTimeout((()=>this.els.input.focus()),100),this.listenMapClick()}collapse(){this.els.input.value="",this.els.input.blur(),D(this.els.search,re.hidden),V(this.els.control,re.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 oe extends d.default{constructor(e=C,t={}){let s,r;_("string"==typeof e,"@param `type` should be string!"),_(e===C||e===j,`@param 'type' should be '${C}'\n or '${j}'!`),t={...F,featureStyle:[new u.default({image:new p.default({scale:.7,src:"//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png"})})],...t};const n=new J(t);if(e===C&&(s=n.els.container),super({element:s,...t}),!(this instanceof oe))return new oe;this.options=t,this.container=s,e===C&&(r=new ne(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 oe})); +!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-label",$="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",label:"gcd-txt-label",input:"gcd-txt-input",search:"gcd-txt-search",icon:"gcd-txt-glass",result:"gcd-txt-result"}},S={containerId:b,buttonControlId:v,inputQueryId:w,inputLabelId:x,inputSearchId:$,cssClasses:k};const q=Object.freeze({__proto__:null,containerId:b,buttonControlId:v,inputQueryId:w,inputLabelId:x,inputSearchId:$,cssClasses:k,default:S}),L="addresschosen",C="nominatim",j="reverse",E="glass-button",T="text-input",I="osm",N="mapquest",P="photon",A="bing",R="opencage",F={provider:I,label:"",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 _(e,t="Assertion failed"){if(!e){if("undefined"!=typeof Error)throw new Error(t);throw t}}function M(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 O(e){return/^\d+$/u.test(e)}function D(e,t,s){if(Array.isArray(e))return void e.forEach((e=>D(e,t)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)Q(e,r[n])||z(e,r[n],s)}function V(e,t,s){if(Array.isArray(e))return void e.forEach((e=>V(e,t,s)));const r=Array.isArray(t)?t:t.split(/\s+/u);let n=r.length;for(;n--;)Q(e,r[n])&&H(e,r[n],s)}function Q(e,t){return e.classList?e.classList.contains(t):G(t).test(e.className)}function B(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 U(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(;++eH(e,t)),s)}function H(e,t,s){e.classList?e.classList.remove(t):e.className=e.className.replace(G(t)," ").trim(),s&&O(s)&&window.setTimeout((()=>z(e,t)),s)}const K=q.cssClasses;class J{constructor(e){this.options=e,this.els=this.createControl()}createControl(){let e,t,s;return this.options.targetType===T?(t=`${K.namespace} ${K.inputText.container}`,e=U(["div",{id:q.containerId,classname:t}],J.input),s={container:e,control:e.querySelector(`.${K.inputText.control}`),label:e.querySelector(`.${K.inputText.label}`),input:e.querySelector(`.${K.inputText.input}`),search:e.querySelector(`.${K.inputText.search}`),result:e.querySelector(`.${K.inputText.result}`)},s.label.innerHTML=this.options.label):(t=`${K.namespace} ${K.glass.container}`,e=U(["div",{id:q.containerId,classname:t}],J.glass),s={container:e,control:e.querySelector(`.${K.glass.control}`),button:e.querySelector(`.${K.glass.button}`),input:e.querySelector(`.${K.glass.input}`),search:e.querySelector(`.${K.glass.search}`),result:e.querySelector(`.${K.glass.result}`)}),s.input.placeholder=this.options.placeholder,s}}function W(e){return new Promise(((t,s)=>{const r=function(e,t){t&&"object"==typeof t&&(e+=(/\?/u.test(e)?"&":"?")+X(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 X(e){return Object.keys(e).reduce(((t,s)=>(t.push("object"==typeof e[s]?X(e[s]):`${encodeURIComponent(s)}=${encodeURIComponent(e[s])}`),t)),[]).join("&")}J.glass=`\n
              \n \n \n \n
              \n
                \n`,J.input=`\n
                \n \n \n \n \n
                \n
                  \n`;class Y{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 Z{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 ee{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 te{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 se{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 re=q.cssClasses;class ne{constructor(e,t){this.Base=e,this.layerName=M("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(),Q(this.els.control,re.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?V(this.els.search,re.hidden):D(this.els.search,re.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(),D(this.els.search,re.spin);const s={url:t.url,data:t.params};t.callbackName&&(s.jsonp=!0,s.callbackName=t.callbackName),W(s).then((e=>{this.options.debug&&console.info(e),V(this.els.search,re.spin);const t=this.provider.handleResponse(e);t&&(this.createList(t),this.listenMapClick())})).catch((()=>{V(this.els.search,re.spin);const e=U("li","
                  Error! No internet connection?
                  ");this.els.result.append(e)}))}createList(e){const t=this.els.result;e.forEach((s=>{let r;if(this.options.provider===I)r=`${s.address.name}`;else r=this.addressTemplate(s.address);if(1==e.length)this.chosen(s,r,s.address,s.original);else{const e=U("li",`${r}`);e.addEventListener("click",(e=>{e.preventDefault(),this.chosen(s,r,s.address,s.original)}),!1),t.append(e)}}))}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:L,address:c,coordinate:i,bbox:l,place:e});else{const t=this.createFeature(i,c);this.Base.dispatchEvent({type:L,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(M("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("")),B(t.join("
                  "),e)}newProvider(){switch(this.options.provider){case I:return new Z(this.options);case N:return new ee;case P:return new Y;case A:return new te;case R:return new se;default:return this.options.provider}}expand(){V(this.els.input,re.spin),D(this.els.control,re.glass.expanded),window.setTimeout((()=>this.els.input.focus()),100),this.listenMapClick()}collapse(){this.els.input.value="",this.els.input.blur(),D(this.els.search,re.hidden),V(this.els.control,re.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 oe extends d.default{constructor(e=C,t){_("string"==typeof e,"@param `type` should be string!"),_(e===C||e===j,`@param 'type' should be '${C}'\n or '${j}'!`);const s={...F,featureStyle:[new u.default({image:new p.default({scale:.7,src:"//cdn.rawgit.com/jonataswalker/map-utils/master/images/marker.png"})})],...t};let r,n;const o=new J(s);if(e===C&&(r=o.els.container),super({element:r,...s}),!(this instanceof oe))return new oe;this.options=s,this.container=r,e===C&&(n=new ne(this,o.els),this.layer=n.layer)}getLayer(){return this.layer}getSource(){return this.getLayer().getSource()}setProvider(e){this.options.provider=e}setProviderKey(e){this.options.key=e}}return oe})); //# sourceMappingURL=ol-geocoder.js.map diff --git a/dist/ol-geocoder.js.map b/dist/ol-geocoder.js.map index 4e8a5ce..7f6b165 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/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 label: '',\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};","export 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 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 label: container.querySelector(`.${klasses.inputText.label}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n elements.label.innerHTML = this.options.label;\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`;","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 break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n if (response.length == 1) {\n this.chosen(row, addressHtml, row.address, row.original);\n } else {\n const li = createElement('li', `${addressHtml}`);\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\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} 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 options = {\n ...DEFAULT_OPTIONS,\n featureStyle: [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ],\n ...options,\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 = 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","label","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","getLayer","setProvider","setProviderKey"],"mappings":";;;;;;+zDAEO,MAAMA,uIAEAC,EACI,gBAGJC,EACA,YADAA,EAEF,UAGEC,EACJ,eADIA,EAEJ,aAKIC,EACN,MADMA,EAED,WAFCA,EAGH,SAHGA,EAIL,OAJKA,EAKD,WAGCC,EAAkB,CAC7BC,SAAUF,EACVG,MAAO,GACPC,YAAa,wBACbC,aAAc,KACdC,WAAYP,EACZQ,KAAM,QACNC,MAAO,EACPC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,qBAAsB,GACtBC,OAAO,GCzCF,SAASC,EAAOC,EAAWC,EAAU,oBAC1C,IAAKD,EAAW,CACd,GAAqB,oBAAVE,MAAuB,MAAM,IAAIA,MAAMD,GAElD,MAAMA,CACP,CACH,CAwBO,SAASE,EAASC,GACvB,MAAMC,EAvBD,WASL,GAJI,gBAAiBC,QAAW,IAC9BA,OAAOC,YAAc,IAGnB,QAASD,OAAOC,aAAgB,EAAO,CACz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I8G,SAASnL,KAAKmH,MAC/B,ECvWY,MAAMF,WAAakF,EAAAA,QAMhC,WAAArM,CAAY0K,EAAOlQ,EAAwByF,EAAU,CAAA,GAoBnD,IAAII,EAEAiM,EArBJ7Q,EAAuB,iBAATiP,EAAmB,mCACjCjP,EACEiP,IAASlQ,GAA0BkQ,IAASlQ,EAC5C,4BAA4BA,iBACtBA,OAERyF,EAAU,IACLtF,EACHI,aAAc,CACZ,IAAIwR,UAAM,CACRC,MAAO,IAAIC,EAAAA,QAAK,CACdC,MAAO,GACPC,IXzBe,4EW6BlB1M,GAOL,MAAM2M,EAAQ,IAAI7M,EAAKE,GAWvB,GATIyK,IAASlQ,IACX6F,EAAYuM,EAAMzM,IAAIE,WAGxBwM,MAAM,CACJjQ,QAASyD,KACNJ,MAGCC,gBAAgBiH,IAAO,OAAO,IAAIA,GAExCjH,KAAKD,QAAUA,EACfC,KAAKG,UAAYA,EAEbqK,IAASlQ,IACX8R,EAAa,IAAIrF,GAAU/G,KAAM0M,EAAMzM,KACvCD,KAAKmH,MAAQiF,EAAWjF,MAE3B,CAKD,QAAAyF,GACE,OAAO5M,KAAKmH,KACb,CAKD,SAAAmE,GACE,OAAOtL,KAAK4M,WAAWtB,WACxB,CAMD,WAAAuB,CAAYnS,GACVsF,KAAKD,QAAQrF,SAAWA,CACzB,CAMD,cAAAoS,CAAe3O,GACb6B,KAAKD,QAAQ5B,IAAMA,CACpB"} \ No newline at end of file +{"version":3,"file":"ol-geocoder.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 label: '',\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};","export 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 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 default 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 label: container.querySelector(`.${klasses.inputText.label}`),\n input: container.querySelector(`.${klasses.inputText.input}`),\n search: container.querySelector(`.${klasses.inputText.search}`),\n result: container.querySelector(`.${klasses.inputText.result}`),\n };\n elements.label.innerHTML = this.options.label;\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`;","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 default 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 break;\n\n default:\n addressHtml = this.addressTemplate(row.address);\n }\n\n if (response.length == 1) {\n this.chosen(row, addressHtml, row.address, row.original);\n } else {\n const li = createElement('li', `${addressHtml}`);\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\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 Html from './html';\nimport Nominatim from './nominatim';\nimport {\n assert,\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, opt) {\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 const options = {\n ...DEFAULT_OPTIONS,\n featureStyle: [\n new Style({\n image: new Icon({\n scale: 0.7,\n src: FEATURE_SRC\n })\n }),\n ],\n ...opt,\n };\n\n let container;\n let $nominatim;\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 = 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","label","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","Style","image","Icon","scale","src","$nominatim","$html","super","getLayer","setProvider","setProviderKey"],"mappings":";;;;;;+zDAEO,MAAMA,uIAEAC,EACI,gBAGJC,EACA,YADAA,EAEF,UAGEC,EACJ,eADIA,EAEJ,aAKIC,EACN,MADMA,EAED,WAFCA,EAGH,SAHGA,EAIL,OAJKA,EAKD,WAGCC,EAAkB,CAC7BC,SAAUF,EACVG,MAAO,GACPC,YAAa,wBACbC,aAAc,KACdC,WAAYP,EACZQ,KAAM,QACNC,MAAO,EACPC,UAAU,EACVC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,qBAAsB,GACtBC,OAAO,GCzCF,SAASC,EAAOC,EAAWC,EAAU,oBAC1C,IAAKD,EAAW,CACd,GAAqB,oBAAVE,MAAuB,MAAM,IAAIA,MAAMD,GAElD,MAAMA,CACP,CACH,CAwBO,SAASE,EAASC,GACvB,MAAMC,EAvBD,WASL,GAJI,gBAAiBC,QAAW,IAC9BA,OAAOC,YAAc,IAGnB,QAASD,OAAOC,aAAgB,EAAO,CACzC,IAAIC,EAAYC,KAAKC,MAEjBH,YAAYI,QAAUJ,YAAYI,OAAOC,kBAC3CJ,EAAYD,YAAYI,OAAOC,iBAGjCN,OAAOC,YAAYG,IAAM,IAAMD,KAAKC,MAAQF,CAC7C,CAED,OAAOF,OAAOC,YAAYG,KAC5B,CAGaA,GAAMG,SAAS,IAE1B,OAAOT,EAASA,EAASC,EAAKA,CAChC,CAEO,SAASS,EAAUC,GACxB,MAAO,SAASC,KAAKD,EACvB,CC3BO,SAASE,EAASC,EAASC,EAAWC,GAC3C,GAAIC,MAAMC,QAAQJ,GAGhB,YAFAA,EAAQK,SAASC,GAASP,EAASO,EAAML,KAK3C,MAAMM,EAAQJ,MAAMC,QAAQH,GAAaA,EAAYA,EAAUO,MAAM,QAErE,IAAIC,EAAIF,EAAMG,OAEd,KAAOD,KACAE,EAASX,EAASO,EAAME,KA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A,EACfC,KAAKG,UAAYA,EAEbqK,IAASlQ,IACXmS,EAAa,IAAI1F,GAAU/G,KAAM0M,EAAMzM,KACvCD,KAAKmH,MAAQsF,EAAWtF,MAE3B,CAKD,QAAAyF,GACE,OAAO5M,KAAKmH,KACb,CAKD,SAAAmE,GACE,OAAOtL,KAAK4M,WAAWtB,WACxB,CAMD,WAAAuB,CAAYnS,GACVsF,KAAKD,QAAQrF,SAAWA,CACzB,CAMD,cAAAoS,CAAe3O,GACb6B,KAAKD,QAAQ5B,IAAMA,CACpB"} \ No newline at end of file diff --git a/dist/ol-geocoder.min.css b/dist/ol-geocoder.min.css index a43a5d0..9c31317 100644 --- a/dist/ol-geocoder.min.css +++ b/dist/ol-geocoder.min.css @@ -1,8 +1,8 @@ /*! - * ol-geocoder - v4.3.1-dev - * A geocoder extension compatible with OpenLayers v7+ & v8+ + * ol-geocoder - v4.3.1 + * A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x * https://github.com/Dominique92/ol-geocoder - * Built: Wed Sep 13 2023 20:58:28 GMT+0200 (heure d’été d’Europe centrale) + * Built: 15/09/2023 16:57:43 */ - .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{height:1.5625em;left:.125em;position:absolute;top:.125em;width:1.5625em}.ol-geocoder .gcd-gl-btn:after{content:"\1F50D"}.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-label{display:inline-block;text-align:center;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{display:inline-block;height:100%;left:9px;position:absolute;top:26px;width:2.5em;z-index:100}.ol-geocoder .gcd-txt-glass:after{content:"\1F50D"}.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 + .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{cursor:pointer;height:1.5625em;left:.125em;position:absolute;top:.125em;width:1.5625em}.ol-geocoder .gcd-gl-btn:after{content:"\1F50D"}.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-label{display:inline-block;text-align:center;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{display:inline-block;height:100%;left:9px;position:absolute;top:26px;width:2.5em;z-index:100}.ol-geocoder .gcd-txt-glass:after{content:"\1F50D"}.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/index.html b/examples/index.html index 572c0ab..fa74996 100644 --- a/examples/index.html +++ b/examples/index.html @@ -4,21 +4,25 @@ - - - - + + + + + + + +
                          -

                          The control above uses the 'proton' provider & 'glass-button' style &

                          -
                          -

                          The control below uses the 'nominatim/osm' provider, 'text-input' style & and is attached outside of the map

                          +

                          The control above uses the 'proton' provider & 'glass-button' style.

                          +
                          +

                          The control below uses the 'nominatim/osm' provider, 'text-input' style & and is attached outside of the map.

                          \ No newline at end of file diff --git a/examples/index.js b/examples/index.js index 5fd7c9b..1e310fe 100644 --- a/examples/index.js +++ b/examples/index.js @@ -1,21 +1,14 @@ console.log('Ol v' + ol.util.VERSION); // Instantiate with photon, little button -const geocoderGlass = new Geocoder('nominatim', { - provider: 'photon', - targetType: 'glass-button', - lang: 'en', - placeholder: 'Search in proton', - limit: 5, - keepOpen: false, -}); +const geocoderGlass = new Geocoder('nominatim'); // Instantiate with nominatim, outside of the map const geocoderDirect = new Geocoder('nominatim', { provider: 'osm', targetType: 'text-input', lang: 'en', - label: 'Direct access to the first found', + label: 'Direct fly to the first found', placeholder: 'Search in nominatim/OSM', limit: 1, keepOpen: false, diff --git a/examples/nodejs.html b/examples/nodejs.html index 9b2e1a2..330b762 100644 --- a/examples/nodejs.html +++ b/examples/nodejs.html @@ -27,7 +27,7 @@ control-nominatim   control-glass   custom-provider   - Miscellaneous features + Misc (Label, one shot fly, control out of the map).

                          diff --git a/package-lock.json b/package-lock.json index 811fac2..71d2789 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "ol-geocoder", - "version": "4.3.1-dev", + "version": "4.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "ol-geocoder", - "version": "4.3.1-dev", + "version": "4.3.1", "license": "MIT", "devDependencies": { "@babel/eslint-parser": "^7.19.1", @@ -37,17 +37,17 @@ "node-sass": "^8.0.0", "node-sass-json-importer": "^4.3.0", "npm-run-all": "^4.1.5", - "ol": "^7.0.0", + "ol": "latest", "postcss": "^8.4.19", "postcss-import": "^14.0.0", "postcss-reporter": "^7.0.1", "prettier": "^2.7.1", "rollup": "^2.79.0", "rollup-plugin-terser": "^7.0.2", - "testcafe": "^2.1.0" + "testcafe": "^3.3.0" }, "peerDependencies": { - "ol": ">8.0.0" + "ol": ">=6.0.0" } }, "node_modules/@aashutoshrathi/word-wrap": { @@ -59,6 +59,12 @@ "node": ">=0.10.0" } }, + "node_modules/@adobe/css-tools": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.3.1.tgz", + "integrity": "sha512-/62yikz7NLScCGAAST5SHdnjaDJQBDq0M2muyRTpf2VQhw6StBg2ALiu73zSJQ4fMVLA+0uBhBHAle7Wg+2kSg==", + "dev": true + }, "node_modules/@ampproject/remapping": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", @@ -2184,13 +2190,90 @@ "integrity": "sha512-LWLNfYGwVJKYpmHUDoODltnlqxdEAl5Qmw7ha1+TSpsABeF94NKSWkQTTV1TB4CM02j2pZyqn36nHgaFl8z7qw==", "dev": true }, - "node_modules/@devexpress/error-stack-parser": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@devexpress/error-stack-parser/-/error-stack-parser-2.0.6.tgz", - "integrity": "sha512-fneVypElGUH6Be39mlRZeAu00pccTlf4oVuzf9xPJD1cdEqI8NyAiQua/EW7lZdrbMUbgyXcJmfKPefhYius3A==", + "node_modules/@devexpress/callsite-record": { + "version": "4.1.7", + "resolved": "https://registry.npmjs.org/@devexpress/callsite-record/-/callsite-record-4.1.7.tgz", + "integrity": "sha512-qr3VQYc0KopduFkEY6SxaOIi1Xhm0jIWQfrxxMVboI/p2rjF/Mj/iqaiUxQQP6F3ujpW/7l0mzhf17uwcFZhBA==", + "dev": true, + "dependencies": { + "@types/lodash": "^4.14.72", + "callsite": "^1.0.0", + "chalk": "^2.4.0", + "error-stack-parser": "^2.1.4", + "highlight-es": "^1.0.0", + "lodash": "4.6.1 || ^4.16.1", + "pinkie-promise": "^2.0.0" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@devexpress/callsite-record/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@devexpress/callsite-record/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, "dependencies": { - "stackframe": "^1.1.1" + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, "node_modules/@electron/asar": { @@ -2739,37 +2822,6 @@ "@jridgewell/sourcemap-codec": "^1.4.14" } }, - "node_modules/@mapbox/jsonlint-lines-primitives": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/@mapbox/mapbox-gl-style-spec": { - "version": "13.28.0", - "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.28.0.tgz", - "integrity": "sha512-B8xM7Fp1nh5kejfIl4SWeY0gtIeewbuRencqO3cJDrCHZpaPg7uY+V8abuR+esMeuOjRl5cLhVTP40v+1ywxbg==", - "dev": true, - "dependencies": { - "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/unitbezier": "^0.0.0", - "csscolorparser": "~1.0.2", - "json-stringify-pretty-compact": "^2.0.0", - "minimist": "^1.2.6", - "rw": "^1.3.3", - "sort-object": "^0.3.2" - }, - "bin": { - "gl-style-composite": "bin/gl-style-composite.js", - "gl-style-format": "bin/gl-style-format.js", - "gl-style-migrate": "bin/gl-style-migrate.js", - "gl-style-validate": "bin/gl-style-validate.js" - } - }, "node_modules/@mapbox/node-pre-gyp": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", @@ -2823,27 +2875,6 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true }, - "node_modules/@mapbox/point-geometry": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==", - "dev": true - }, - "node_modules/@mapbox/unitbezier": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", - "integrity": "sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA==", - "dev": true - }, - "node_modules/@miherlosev/esm": { - "version": "3.2.26", - "resolved": "https://registry.npmjs.org/@miherlosev/esm/-/esm-3.2.26.tgz", - "integrity": "sha512-TaW4jTGVE1/ln2VGFChnheMh589QCAZy1MVnLvjjSzZ4pEAa4WYAWPwFkDVZbSdPQdLfZy7LuTyZjWRkhX9/Gg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, "node_modules/@nicolo-ribaudo/eslint-scope-5-internals": { "version": "5.1.1-v1", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz", @@ -3579,15 +3610,6 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "engines": { - "node": ">=0.4.2" - } - }, "node_modules/ansi-align": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.1.tgz", @@ -3887,18 +3909,6 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", "dev": true }, - "node_modules/atob": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", - "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", - "dev": true, - "bin": { - "atob": "bin/atob.js" - }, - "engines": { - "node": ">= 4.5.0" - } - }, "node_modules/autoprefixer": { "version": "10.4.15", "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-10.4.15.tgz", @@ -4382,92 +4392,6 @@ "node": "*" } }, - "node_modules/callsite-record": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/callsite-record/-/callsite-record-4.1.5.tgz", - "integrity": "sha512-OqeheDucGKifjQRx524URgV4z4NaKjocGhygTptDea+DLROre4ZEecA4KXDq+P7qlGCohYVNOh3qr+y5XH5Ftg==", - "dev": true, - "dependencies": { - "@devexpress/error-stack-parser": "^2.0.6", - "@types/lodash": "^4.14.72", - "callsite": "^1.0.0", - "chalk": "^2.4.0", - "highlight-es": "^1.0.0", - "lodash": "4.6.1 || ^4.16.1", - "pinkie-promise": "^2.0.0" - } - }, - "node_modules/callsite-record/node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsite-record/node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsite-record/node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/callsite-record/node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/callsite-record/node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/callsite-record/node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/callsite-record/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/callsites": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", @@ -4912,18 +4836,6 @@ "node": ">=0.5.2" } }, - "node_modules/css": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/css/-/css-2.2.3.tgz", - "integrity": "sha512-0W171WccAjQGGTKLhw4m2nnl0zPHUlTO/I8td4XzJgIB8Hg3ZZx71qT4G4eX8OVsSiaAKiUMy73E3nsbPlg2DQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "source-map": "^0.1.38", - "source-map-resolve": "^0.5.1", - "urix": "^0.1.0" - } - }, "node_modules/css-declaration-sorter": { "version": "6.4.1", "resolved": "https://registry.npmjs.org/css-declaration-sorter/-/css-declaration-sorter-6.4.1.tgz", @@ -4977,24 +4889,6 @@ "url": "https://github.com/sponsors/fb55" } }, - "node_modules/css/node_modules/source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha512-VtCvB9SIQhk3aF6h+N85EaqIaBFIAfZ9Cu+NJHHVvc8BbEcnvDcFw6sqQ2dQrT6SlOrZq3tIvyD9+EGq/lJryQ==", - "dev": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/csscolorparser": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/csscolorparser/-/csscolorparser-1.0.3.tgz", - "integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==", - "dev": true - }, "node_modules/cssesc": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", @@ -5190,15 +5084,6 @@ "integrity": "sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==", "dev": true }, - "node_modules/decode-uri-component": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz", - "integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, "node_modules/decompress-response": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", @@ -5781,20 +5666,14 @@ } }, "node_modules/error-stack-parser": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-1.3.6.tgz", - "integrity": "sha512-xhuSYd8wLgOXwNgjcPeXMPL/IiiA1Huck+OPvClpJViVNNlJVtM41o+1emp7bPvlCJwCatFX2DWc05/DgfbWzA==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/error-stack-parser/-/error-stack-parser-2.1.4.tgz", + "integrity": "sha512-Sk5V6wVazPhq5MhpO+AUxJn5x7XSXGl1R93Vn7i+zS15KDVxQijejNCrz8340/2bgLBjR9GtEG8ZVKONDjcqGQ==", "dev": true, "dependencies": { - "stackframe": "^0.3.1" + "stackframe": "^1.3.4" } }, - "node_modules/error-stack-parser/node_modules/stackframe": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/stackframe/-/stackframe-0.3.1.tgz", - "integrity": "sha512-XmoiF4T5nuWEp2x2w92WdGjdHGY/cZa6LIbRsDRQR/Xlk4uW0PAUlH1zJYVffocwKpCdwyuypIp25xsSXEtZHw==", - "dev": true - }, "node_modules/es-abstract": { "version": "1.22.1", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.1.tgz", @@ -8969,12 +8848,6 @@ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", "dev": true }, - "node_modules/json-stringify-pretty-compact": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz", - "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==", - "dev": true - }, "node_modules/json5": { "version": "2.2.3", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", @@ -9307,12 +9180,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/mapbox-to-css-font": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/mapbox-to-css-font/-/mapbox-to-css-font-2.4.2.tgz", - "integrity": "sha512-f+NBjJJY4T3dHtlEz1wCG7YFlkODEjFIYlxDdLIDMNpkSksqTt+l/d4rjuwItxuzkuMFvPyrjzV2lxRM4ePcIA==", - "dev": true - }, "node_modules/match-url-wildcard": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/match-url-wildcard/-/match-url-wildcard-0.0.4.tgz", @@ -10474,14 +10341,13 @@ } }, "node_modules/ol": { - "version": "7.5.2", - "resolved": "https://registry.npmjs.org/ol/-/ol-7.5.2.tgz", - "integrity": "sha512-HJbb3CxXrksM6ct367LsP3N+uh+iBBMdP3DeGGipdV9YAYTP0vTJzqGnoqQ6C2IW4qf8krw9yuyQbc9fjOIaOQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ol/-/ol-8.1.0.tgz", + "integrity": "sha512-cx3SH2plpFS9fM8pp1nCypgQXGJD7Mcb1E3mEySmy5XEw1DUEo+kkNzgtAZz5qupekqi7aU9iBJEjCoMfqvO2Q==", "dev": true, "dependencies": { "earcut": "^2.2.3", "geotiff": "^2.0.7", - "ol-mapbox-style": "^10.1.0", "pbf": "3.2.1", "rbush": "^3.0.1" }, @@ -10490,17 +10356,6 @@ "url": "https://opencollective.com/openlayers" } }, - "node_modules/ol-mapbox-style": { - "version": "10.7.0", - "resolved": "https://registry.npmjs.org/ol-mapbox-style/-/ol-mapbox-style-10.7.0.tgz", - "integrity": "sha512-S/UdYBuOjrotcR95Iq9AejGYbifKeZE85D9VtH11ryJLQPTZXZSW1J5bIXcr4AlAH6tyjPPHTK34AdkwB32Myw==", - "dev": true, - "dependencies": { - "@mapbox/mapbox-gl-style-spec": "^13.23.1", - "mapbox-to-css-font": "^2.4.1", - "ol": "^7.3.0" - } - }, "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", @@ -12108,13 +11963,6 @@ "protocol-buffers-schema": "^3.3.1" } }, - "node_modules/resolve-url": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", - "integrity": "sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==", - "deprecated": "https://github.com/lydell/resolve-url#deprecated", - "dev": true - }, "node_modules/resolve.exports": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", @@ -12226,12 +12074,6 @@ "queue-microtask": "^1.2.2" } }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==", - "dev": true - }, "node_modules/safe-array-concat": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz", @@ -12561,37 +12403,6 @@ "node": ">= 10" } }, - "node_modules/sort-asc": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/sort-asc/-/sort-asc-0.1.0.tgz", - "integrity": "sha512-jBgdDd+rQ+HkZF2/OHCmace5dvpos/aWQpcxuyRs9QUbPRnkEJmYVo81PIGpjIdpOcsnJ4rGjStfDHsbn+UVyw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sort-desc": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/sort-desc/-/sort-desc-0.1.1.tgz", - "integrity": "sha512-jfZacW5SKOP97BF5rX5kQfJmRVZP5/adDUTY8fCSPvNcXDVpUEe2pr/iKGlcyZzchRJZrswnp68fgk3qBXgkJw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/sort-object": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/sort-object/-/sort-object-0.3.2.tgz", - "integrity": "sha512-aAQiEdqFTTdsvUFxXm3umdo04J7MRljoVGbBlkH7BgNsMvVNAJyGj7C/wV1A8wHWAJj/YikeZbfuCKqhggNWGA==", - "dev": true, - "dependencies": { - "sort-asc": "^0.1.0", - "sort-desc": "^0.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -12610,20 +12421,6 @@ "node": ">=0.10.0" } }, - "node_modules/source-map-resolve": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", - "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", - "deprecated": "See https://github.com/lydell/source-map-resolve#deprecated", - "dev": true, - "dependencies": { - "atob": "^2.1.2", - "decode-uri-component": "^0.2.0", - "resolve-url": "^0.2.1", - "source-map-url": "^0.4.0", - "urix": "^0.1.0" - } - }, "node_modules/source-map-support": { "version": "0.5.13", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", @@ -12634,13 +12431,6 @@ "source-map": "^0.6.0" } }, - "node_modules/source-map-url": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", - "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", - "deprecated": "See https://github.com/lydell/source-map-url#deprecated", - "dev": true - }, "node_modules/sourcemap-codec": { "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", @@ -13136,9 +12926,9 @@ } }, "node_modules/testcafe": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-2.6.2.tgz", - "integrity": "sha512-BVlrx6bjVMMIG4JBle0AO9t6dER51+t7ncWGptbnJYzUE/FkigZTHLCPDj4uNid6WYg4yz4AzfkA408WvTiCQg==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/testcafe/-/testcafe-3.3.0.tgz", + "integrity": "sha512-fffFnuZwAlZ4y9mkjygHZUGXad/7pXuj/RHkuwvft0GjRDqRHIcfR5aWrVLGnGpFeO55l48Z2kq1SxT2I+879g==", "dev": true, "dependencies": { "@babel/core": "^7.12.1", @@ -13158,17 +12948,16 @@ "@babel/preset-react": "^7.12.1", "@babel/runtime": "^7.12.5", "@devexpress/bin-v8-flags-filter": "^1.3.0", - "@miherlosev/esm": "3.2.26", + "@devexpress/callsite-record": "^4.1.6", "@types/node": "^12.20.10", "async-exit-hook": "^1.1.2", "babel-plugin-module-resolver": "^5.0.0", "babel-plugin-syntax-trailing-function-commas": "^6.22.0", "bowser": "^2.8.1", "callsite": "^1.0.0", - "callsite-record": "^4.0.0", "chai": "4.3.4", "chalk": "^2.3.0", - "chrome-remote-interface": "^0.32.1", + "chrome-remote-interface": "^0.32.2", "coffeescript": "^2.3.1", "commander": "^8.3.0", "debug": "^4.3.1", @@ -13180,7 +12969,7 @@ "email-validator": "^2.0.4", "emittery": "^0.4.1", "endpoint-utils": "^1.0.2", - "error-stack-parser": "^1.3.6", + "error-stack-parser": "^2.1.4", "execa": "^4.0.3", "get-os-info": "^1.0.2", "globby": "^11.0.4", @@ -13218,12 +13007,12 @@ "resolve-cwd": "^1.0.0", "resolve-from": "^4.0.0", "sanitize-filename": "^1.6.0", - "semver": "^5.6.0", + "semver": "^7.5.3", "set-cookie-parser": "^2.5.1", "source-map-support": "^0.5.16", "strip-bom": "^2.0.0", - "testcafe-browser-tools": "2.0.25", - "testcafe-hammerhead": "31.4.3", + "testcafe-browser-tools": "2.0.26", + "testcafe-hammerhead": "31.6.1", "testcafe-legacy-api": "5.1.6", "testcafe-reporter-json": "^2.1.0", "testcafe-reporter-list": "^2.2.0", @@ -13247,9 +13036,9 @@ } }, "node_modules/testcafe-browser-tools": { - "version": "2.0.25", - "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.25.tgz", - "integrity": "sha512-LK/ZOJUwnpjdJl131qrBN0toCv2wZj2Elb8UPTU71n9Woq7kZtGine4P5XvvvO7mE8bjBfWJOBW9jRhHxyIWzQ==", + "version": "2.0.26", + "resolved": "https://registry.npmjs.org/testcafe-browser-tools/-/testcafe-browser-tools-2.0.26.tgz", + "integrity": "sha512-nTKSJhBzn9BmnOs0xVzXMu8dN2Gu13Ca3x3SJr/zF6ZdKjXO82JlbHu55dt5MFoWjzAQmwlqBkSxPaYicsTgUw==", "dev": true, "dependencies": { "array-find": "^1.0.0", @@ -13415,16 +13204,16 @@ } }, "node_modules/testcafe-hammerhead": { - "version": "31.4.3", - "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.4.3.tgz", - "integrity": "sha512-Z8wubj/8t3T5udVyqf2Kqy9oZFE8zDIWnuItVIEscYQ8PB6eWCkjq3oSx9J0XzSdakFnsUYP1T/KVlNe5z306w==", + "version": "31.6.1", + "resolved": "https://registry.npmjs.org/testcafe-hammerhead/-/testcafe-hammerhead-31.6.1.tgz", + "integrity": "sha512-tMdF183bTL+hMNzIdUUNpg32T2hlwaI9CEXxOJpgg6VnzCpy1RDV5+wcIJB1ywhs6cdd5ltQZuaHrm1tWbyR1A==", "dev": true, "dependencies": { + "@adobe/css-tools": "^4.3.0-rc.1", "@electron/asar": "^3.2.3", "acorn-hammerhead": "0.6.2", "bowser": "1.6.0", "crypto-md5": "^1.0.0", - "css": "2.2.3", "debug": "4.3.1", "esotope-hammerhead": "0.6.4", "http-cache-semantics": "^4.1.0", @@ -13438,12 +13227,13 @@ "mustache": "^2.1.1", "nanoid": "^3.1.12", "os-family": "^1.0.0", - "parse5": "2.2.3", + "parse5": "^7.1.2", "pinkie": "2.0.4", "read-file-relative": "^1.2.0", - "semver": "5.5.0", - "tough-cookie": "4.0.0", - "tunnel-agent": "0.6.0" + "semver": "7.5.3", + "tough-cookie": "4.1.3", + "tunnel-agent": "0.6.0", + "ws": "^7.4.6" }, "engines": { "node": ">=14.0.0" @@ -13505,12 +13295,6 @@ "readable-stream": "^2.0.1" } }, - "node_modules/testcafe-hammerhead/node_modules/parse5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-2.2.3.tgz", - "integrity": "sha512-yJQdbcT+hCt6HD+BuuUvjHUdNwerQIKSJSm7tXjtp6oIH5Mxbzlt/VIIeWxblsgcDt1+E7kxPeilD5McWswStA==", - "dev": true - }, "node_modules/testcafe-hammerhead/node_modules/readable-stream": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", @@ -13533,12 +13317,30 @@ "dev": true }, "node_modules/testcafe-hammerhead/node_modules/semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "7.5.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.3.tgz", + "integrity": "sha512-QBlUtyVk/5EeHbi7X0fw6liDZc7BBmEaSYn01fMU1OUYbf6GPsbTtd8WmnqbI20SeycoHSeiybkE/q1Q+qlThQ==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/testcafe-hammerhead/node_modules/semver/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" } }, "node_modules/testcafe-hammerhead/node_modules/string_decoder": { @@ -13550,28 +13352,32 @@ "safe-buffer": "~5.1.0" } }, - "node_modules/testcafe-hammerhead/node_modules/tough-cookie": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-4.0.0.tgz", - "integrity": "sha512-tHdtEpQCMrc1YLrMaqXXcj6AxhYi/xgit6mZu1+EDWUn+qhUf8wMQoFIy9NXuq23zAwtcB0t/MjACGR18pcRbg==", + "node_modules/testcafe-hammerhead/node_modules/ws": { + "version": "7.5.9", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.5.9.tgz", + "integrity": "sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==", "dev": true, - "dependencies": { - "psl": "^1.1.33", - "punycode": "^2.1.1", - "universalify": "^0.1.2" - }, "engines": { - "node": ">=6" + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } } }, - "node_modules/testcafe-hammerhead/node_modules/universalify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", - "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } + "node_modules/testcafe-hammerhead/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true }, "node_modules/testcafe-legacy-api": { "version": "5.1.6", @@ -13844,6 +13650,18 @@ "node": ">=0.10.0" } }, + "node_modules/testcafe/node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/testcafe/node_modules/parse5": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/parse5/-/parse5-1.5.1.tgz", @@ -13881,12 +13699,18 @@ } }, "node_modules/testcafe/node_modules/semver": { - "version": "5.7.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", - "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, "bin": { - "semver": "bin/semver" + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" } }, "node_modules/testcafe/node_modules/source-map-support": { @@ -13936,6 +13760,12 @@ "node": ">=4.2.0" } }, + "node_modules/testcafe/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/text-table": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", @@ -14382,13 +14212,6 @@ "punycode": "^2.1.0" } }, - "node_modules/urix": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", - "integrity": "sha512-Am1ousAhSLBeB9cG/7k7r2R0zj50uDRlZHPGbazid5s9rlF1F/QKYObEKSIunSjIOkJZqwRRLpvewjEkM7pSqg==", - "deprecated": "Please see https://github.com/lydell/urix#deprecated", - "dev": true - }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", diff --git a/package.json b/package.json index ba2dc06..4fc19bc 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "ol-geocoder", - "version": "4.3.1-dev", - "description": "A geocoder extension compatible with OpenLayers v7+ & v8+", + "version": "4.3.1", + "description": "A geocoder extension compatible with OpenLayers v6.x, v7.x & v8.x", "author": "Jonatas Walker", "homepage": "https://github.com/Dominique92/ol-geocoder", "license": "MIT", @@ -14,7 +14,7 @@ "url": "https://github.com/Dominique92/ol-geocoder/issues" }, "files": [ - "dist/" + "dist" ], "browserslist": [ "defaults" @@ -43,7 +43,7 @@ }, "dependencies": {}, "peerDependencies": { - "ol": ">8.0.0" + "ol": ">=6.0.0" }, "devDependencies": { "@babel/eslint-parser": "^7.19.1", @@ -53,7 +53,6 @@ "@rollup/plugin-node-resolve": "^11.2.1", "autoprefixer": "^10.4.13", "babel-jest": "^29.0.3", - "js-beautify": "latest", "boxen": "^5.1.2", "bytes": "^3.1.2", "canvas": "^2.10.2", @@ -71,16 +70,17 @@ "husky": "^4.3.8", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", + "js-beautify": "latest", "node-sass": "^8.0.0", "node-sass-json-importer": "^4.3.0", "npm-run-all": "^4.1.5", - "ol": "^7.0.0", + "ol": "latest", "postcss": "^8.4.19", "postcss-import": "^14.0.0", "postcss-reporter": "^7.0.1", "prettier": "^2.7.1", "rollup": "^2.79.0", "rollup-plugin-terser": "^7.0.2", - "testcafe": "^2.1.0" + "testcafe": "^3.3.0" } } \ No newline at end of file diff --git a/src/base.js b/src/base.js index e13b7c8..ed7039d 100644 --- a/src/base.js +++ b/src/base.js @@ -8,12 +8,8 @@ import { FEATURE_SRC } from '../konstants'; -import { - Html -} from './html'; -import { - Nominatim -} from './nominatim'; +import Html from './html'; +import Nominatim from './nominatim'; import { assert, } from './helpers/mix'; @@ -28,14 +24,14 @@ export default class Base extends Control { * @param {string} type nominatim|reverse. * @param {object} options Options. */ - constructor(type = CONTROL_TYPE.NOMINATIM, options = {}) { + constructor(type = CONTROL_TYPE.NOMINATIM, opt) { assert(typeof type === 'string', '@param `type` should be string!'); assert( type === CONTROL_TYPE.NOMINATIM || type === CONTROL_TYPE.REVERSE, `@param 'type' should be '${CONTROL_TYPE.NOMINATIM}' or '${CONTROL_TYPE.REVERSE}'!` ); - options = { + const options = { ...DEFAULT_OPTIONS, featureStyle: [ new Style({ @@ -45,13 +41,11 @@ export default class Base extends Control { }) }), ], - ...options, - }; + ...opt, + }; let container; - let $nominatim; - const $html = new Html(options); if (type === CONTROL_TYPE.NOMINATIM) { diff --git a/src/html.js b/src/html.js index 57709d4..a8e1a9e 100644 --- a/src/html.js +++ b/src/html.js @@ -12,7 +12,7 @@ const klasses = VARS.cssClasses; /** * @class Html */ -export class Html { +export default class Html { /** * @constructor * @param {object} options Options. diff --git a/src/nominatim.js b/src/nominatim.js index c0456fe..bfdad9b 100644 --- a/src/nominatim.js +++ b/src/nominatim.js @@ -36,7 +36,7 @@ const klasses = VARS.cssClasses; /** * @class Nominatim */ -export class Nominatim { +export default class Nominatim { /** * @constructor * @param {Function} base Base class. diff --git a/src/sass/glass.scss b/src/sass/glass.scss index e190618..0ebe55c 100644 --- a/src/sass/glass.scss +++ b/src/sass/glass.scss @@ -82,6 +82,7 @@ $result-top: $control-height; height: $btn-search-width; top: $btn-search-top; left: $btn-search-top; + cursor: pointer; } .#{map-get($glass, button)}:after { content: "\1F50D";