diff --git a/.idea/.name b/.idea/.name deleted file mode 100644 index 04a203a..0000000 --- a/.idea/.name +++ /dev/null @@ -1 +0,0 @@ -ol3-popup-umd \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index d12b5eb..e5e7116 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/LICENSE b/LICENSE index 025339d..9e6f5dc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,9 +1,7 @@ The MIT License (MIT) -Copyright (c) 2016 Matt Walker, Vladimir Vershinin -Based on OpenLayers 3. Copyright 2005-2015 OpenLayers Contributors. All rights reserved. http://openlayers.org. -Copyright for portions of project ol3-popup-umd are held by [Matt Walker, 2016] as part of project ol3-popup. -All other copyright for project ol3-popup-umd are held by [Vladimir Vershinin, 2016]. +Copyright (c) 2016 Matt Walker (original work) +Copyright (c) 2016-2017 Vladimir Vershinin (modification work) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index e2bae83..8c50dd6 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,27 @@ -[![Build Status](https://travis-ci.org/ghettovoice/ol3-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol3-popup-umd) -[![view on npm](http://img.shields.io/npm/v/ol3-popup-umd.svg)](https://www.npmjs.org/package/ol3-popup-umd) +[![Build Status](https://travis-ci.org/ghettovoice/ol-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol-popup-umd) +[![view on npm](http://img.shields.io/npm/v/ol-popup-umd.svg)](https://www.npmjs.org/package/ol-popup-umd) +[![License](https://img.shields.io/github/license/ghettovoice/ol-popup-umd.svg)](https://github.com/ghettovoice/ol-popup-umd/blob/master/LICENSE) -# ol3-popup-umd +# ol-popup-umd -Basic popup for an OpenLayers 3 map. By default the map is centered so that the popup is entirely visible. +> Popup overlay for OpenLayers with UMD wrapper + +Basic popup for an [OpenLayers](http://openlayers.org) lib. By default the map is centered so that the popup is entirely visible. This project originally forked from [ol3-popup](https://github.com/walkermatt/ol3-popup) by Matt Walker and extended with new features like event emitting, additional methods and others, also packed as UMD package. ## Installation -Install it thought NPM or Bower: +Install it thought NPM: ```shell -npm install ol3-popup-umd -bower install ol3-popup-umd +npm install ol-popup-umd ``` Or download the latest version archive and add it with script tag: ```html - + ``` ## Usage @@ -27,8 +29,8 @@ Or download the latest version archive and add it with script tag: Plugin is packed into UMD wrapper, import it with CommonJS or ES6: ```js -import PopupOverlay from 'ol3-popup-umd'; -const PopupOverlay = require('ol3-popup-umd'); +import PopupOverlay from 'ol-popup-umd'; +const PopupOverlay = require('ol-popup-umd'); ``` In Browser environment it is available as `ol.PopupOverlay`. diff --git a/bower.json b/bower.json index 01e0e41..a04421d 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { - "name": "ol3-popup-umd", - "description": "Popup overlay for OpenLayers 3 with UMD wrapper", + "name": "ol-popup-umd", + "description": "Popup overlay for OpenLayers with UMD wrapper", "main": "dist/bundle.js", "authors": [ "Matt Walker (http://longwayaround.org.uk)", @@ -8,17 +8,18 @@ ], "license": "MIT", "keywords": [ - "ol3", + "ol", "openlayers", - "ol3-popup-umd" + "ol-popup-umd" ], - "homepage": "https://github.com/ghettovoice/ol3-popup-umd", + "homepage": "https://github.com/ghettovoice/ol-popup-umd", "repository": { "type": "git", - "url": "git://github.com/ghettovoice/ol3-popup-umd.git" + "url": "git://github.com/ghettovoice/ol-popup-umd.git" }, "ignore": [ "**/.*", + "*.iml", "node_modules", "bower_components", "test", diff --git a/dist/bundle.css b/dist/bundle.css index 1fc4e46..8e8e3a5 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -1,14 +1,13 @@ /*! - * Popup overlay for OpenLayers 3 with UMD wrapper + * Popup overlay for OpenLayers with UMD wrapper * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup * - * @package ol3-popup-umd - * @author Vladimir Vershinin (https://github.com/ghettovoice) + * @package ol-popup-umd + * @author Vladimir Vershinin * @author Matt Walker (http://longwayaround.org.uk),@author Avi Kelman - * @version 1.3.0 + * @version 1.3.1 * @licence MIT https://opensource.org/licenses/MIT - * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org - * @copyright (c) 2016 Matt Walker, Vladimir Vershinin (https://github.com/ghettovoice) + * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ .ol-popup { display: none; diff --git a/dist/bundle.css.map b/dist/bundle.css.map index c6722e6..32ddc81 100644 --- a/dist/bundle.css.map +++ b/dist/bundle.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack:///src/src/popup.scss"],"names":[],"mappings":";;;;;;;;;;;;AAAA;EACI,cAAwB;EACxB,mBAA4B;EAC5B,wBAAyB;EACzB,cAAwB;EACxB,0BAAqC;EACrC,aAAwB;EACxB,YAAyB;EACzB,4CAAoC,EA+DvC;EAvED;IAWQ,UAAsB;IACtB,0BAAmC;IACnC,aAAqB;IACrB,UAAmB;IACnB,SAAmB;IACnB,mBAA0B;IAC1B,qBAAsB,EACzB;EAlBL;IAqBQ,wBAAyB;IACzB,mBAAwB;IACxB,WAAwB;IACxB,mBAAyB,EAC5B;EAzBL;IA4BQ,0BAA2B;IAC3B,mBAAwB;IACxB,WAAwB;IACxB,mBAAyB,EAC5B;EAhCL;IAmCQ,iBAAmB;IACnB,iBAAkB;IAClB,mBAAoB;IACpB,iBAAkB,EAKrB;EA3CL;MAyCY,iBAAkB,EACrB;EA1CT;IA8CQ,mBAA2B;IAC3B,OAAoB;IACpB,SAAoB;IACpB,gBAAuB;IACvB,eAAwB;IACxB,YAAuB;IACvB,sBAAuB,EAK1B;EAzDL;MAuDY,iBAAkB,EACrB;EAxDT;IA4DQ,iBAAkB,EAMrB;EAlEL;MA+DY,eAAgB;MAChB,UAAY,EACf;EAjET;IAqEQ,oBAAqB,EACxB","file":"bundle.css","sourcesContent":[".ol-popup {\n display : none;\n position : absolute;\n background-color : white;\n padding : 20px;\n border : 1px solid #cccccc;\n bottom : 12px;\n left : -50px;\n box-shadow : 2px 2px 10px rgba(0, 0, 0, 0.2);\n\n &:after, &:before {\n top : 100%;\n border : solid transparent;\n content : \" \";\n height : 0;\n width : 0;\n position : absolute;\n pointer-events : none;\n }\n\n &:after {\n border-top-color : white;\n border-width : 10px;\n left : 48px;\n margin-left : -10px;\n }\n\n &:before {\n border-top-color : #cccccc;\n border-width : 11px;\n left : 48px;\n margin-left : -11px;\n }\n\n .ol-popup-content {\n min-width : 170px;\n max-height : 50vh;\n overflow-x : hidden;\n overflow-y : auto;\n\n h3 {\n margin : 0.25em 0;\n }\n }\n\n .ol-popup-closer {\n position : absolute;\n top : 0;\n right : 0;\n font-size : 150%;\n padding : 0 4px;\n color : gray;\n text-decoration : none;\n\n &:after {\n content : \"\\2716\";\n }\n }\n\n .infoResult {\n min-width : 130px;\n\n p {\n padding : 0.1em;\n margin : 0;\n }\n }\n\n .marker {\n margin-bottom : 30px;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// webpack:///src/src/popup.scss"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack:///src/src/popup.scss"],"names":[],"mappings":";;;;;;;;;;;AAAA;EACI,cAAwB;EACxB,mBAA4B;EAC5B,wBAAyB;EACzB,cAAwB;EACxB,0BAAqC;EACrC,aAAwB;EACxB,YAAyB;EACzB,4CAAoC,EA+DvC;EAvED;IAWQ,UAAsB;IACtB,0BAAmC;IACnC,aAAqB;IACrB,UAAmB;IACnB,SAAmB;IACnB,mBAA0B;IAC1B,qBAAsB,EACzB;EAlBL;IAqBQ,wBAAyB;IACzB,mBAAwB;IACxB,WAAwB;IACxB,mBAAyB,EAC5B;EAzBL;IA4BQ,0BAA2B;IAC3B,mBAAwB;IACxB,WAAwB;IACxB,mBAAyB,EAC5B;EAhCL;IAmCQ,iBAAmB;IACnB,iBAAkB;IAClB,mBAAoB;IACpB,iBAAkB,EAKrB;EA3CL;MAyCY,iBAAkB,EACrB;EA1CT;IA8CQ,mBAA2B;IAC3B,OAAoB;IACpB,SAAoB;IACpB,gBAAuB;IACvB,eAAwB;IACxB,YAAuB;IACvB,sBAAuB,EAK1B;EAzDL;MAuDY,iBAAkB,EACrB;EAxDT;IA4DQ,iBAAkB,EAMrB;EAlEL;MA+DY,eAAgB;MAChB,UAAY,EACf;EAjET;IAqEQ,oBAAqB,EACxB","file":"bundle.css","sourcesContent":[".ol-popup {\n display : none;\n position : absolute;\n background-color : white;\n padding : 20px;\n border : 1px solid #cccccc;\n bottom : 12px;\n left : -50px;\n box-shadow : 2px 2px 10px rgba(0, 0, 0, 0.2);\n\n &:after, &:before {\n top : 100%;\n border : solid transparent;\n content : \" \";\n height : 0;\n width : 0;\n position : absolute;\n pointer-events : none;\n }\n\n &:after {\n border-top-color : white;\n border-width : 10px;\n left : 48px;\n margin-left : -10px;\n }\n\n &:before {\n border-top-color : #cccccc;\n border-width : 11px;\n left : 48px;\n margin-left : -11px;\n }\n\n .ol-popup-content {\n min-width : 170px;\n max-height : 50vh;\n overflow-x : hidden;\n overflow-y : auto;\n\n h3 {\n margin : 0.25em 0;\n }\n }\n\n .ol-popup-closer {\n position : absolute;\n top : 0;\n right : 0;\n font-size : 150%;\n padding : 0 4px;\n color : gray;\n text-decoration : none;\n\n &:after {\n content : \"\\2716\";\n }\n }\n\n .infoResult {\n min-width : 130px;\n\n p {\n padding : 0.1em;\n margin : 0;\n }\n }\n\n .marker {\n margin-bottom : 30px;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// webpack:///src/src/popup.scss"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/bundle.js b/dist/bundle.js index b5c574e..cd8ff38 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -1,14 +1,13 @@ /*! - * Popup overlay for OpenLayers 3 with UMD wrapper + * Popup overlay for OpenLayers with UMD wrapper * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup * - * @package ol3-popup-umd - * @author Vladimir Vershinin (https://github.com/ghettovoice) + * @package ol-popup-umd + * @author Vladimir Vershinin * @author Matt Walker (http://longwayaround.org.uk),@author Avi Kelman - * @version 1.3.0 + * @version 1.3.1 * @licence MIT https://opensource.org/licenses/MIT - * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org - * @copyright (c) 2016 Matt Walker, Vladimir Vershinin (https://github.com/ghettovoice) + * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') @@ -79,7 +78,7 @@ return /******/ (function(modules) { // webpackBootstrap __webpack_require__(4); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - + /** * Popup overlay for OpenLayers 3 with UMD wrapper. * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup @@ -88,8 +87,7 @@ return /******/ (function(modules) { // webpackBootstrap * @author Matt Walker (http://longwayaround.org.uk) * @author Avi Kelman * @licence MIT https://opensource.org/licenses/MIT - * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org - * @copyright (c) 2016 Matt Walker, Vladimir Vershinin + * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ exports.default = _Popup2.default; module.exports = exports['default']; @@ -180,7 +178,7 @@ return /******/ (function(modules) { // webpackBootstrap }; /** - * Popup Overlay for OpenLayer 3. + * Popup Overlay for OpenLayers. */ var Popup = function (_ol$Overlay) { @@ -189,7 +187,6 @@ return /******/ (function(modules) { // webpackBootstrap /** * @param {PopupOptions} [options] Popup options. */ - function Popup() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; @@ -207,7 +204,6 @@ return /******/ (function(modules) { // webpackBootstrap * @type {function} * @private */ - var _this = _possibleConstructorReturn(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, _extends({}, options, { element: element }))); @@ -514,17 +510,15 @@ return /******/ (function(modules) { // webpackBootstrap */ function enableTouchScroll(elm) { if (isTouchDevice()) { - (function () { - var scrollStartPos = 0; + var scrollStartPos = 0; - elm.addEventListener("touchstart", function (event) { - scrollStartPos = this.scrollTop + event.touches[0].pageY; - }, false); + elm.addEventListener("touchstart", function (event) { + scrollStartPos = this.scrollTop + event.touches[0].pageY; + }, false); - elm.addEventListener("touchmove", function (event) { - this.scrollTop = scrollStartPos - event.touches[0].pageY; - }, false); - })(); + elm.addEventListener("touchmove", function (event) { + this.scrollTop = scrollStartPos - event.touches[0].pageY; + }, false); } } module.exports = exports["default"]; @@ -610,7 +604,7 @@ return /******/ (function(modules) { // webpackBootstrap value: true }); - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; exports.coalesce = coalesce; exports.toArray = toArray; diff --git a/dist/bundle.js.map b/dist/bundle.js.map index e2ebbe9..a8667a6 100644 --- a/dist/bundle.js.map +++ b/dist/bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 21f30f6b5e3bac16a1a5","webpack:///./src/index.js","webpack:///./src/Popup.js","webpack:///./src/easing.js","webpack:///./src/util.js","webpack:///./src/popup.scss","webpack:///external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}"],"names":[],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AACA;;AAEA;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AF,IAAW,QAAO,KAAP,yCAAO,KAAP,OAAiB,QAAnC;AACH;;;;;;;;;AASM,UAAS,QAAT,CAAkB,KAAlB,EAAyB;AAC5B,YAAO,SAAS,IAAT,KACH,OAAO,KAAP,KAAiB,QAAjB,IACA,SAAS,KAAT,KAAmB,OAAO,SAAP,CAAiB,QAAjB,CAA0B,IAA1B,CAA+B,KAA/B,MAA0C,iBAF1D,CAAP;AAIH;;;;;;;;;AASM,UAAS,WAAT,CAAqB,KAArB,EAA4B;AAC/B,YAAO,CAAC,CAAC,KAAF,IAAW,OAAO,MAAM,MAAb,KAAwB,QAA1C;AACH;;;;;AAKM,UAAS,YAAT,CAAsB,IAAtB,EAA4B;AAC/B,YAAO,KAAK,aAAL,EAAP,EAA6B;AACzB,cAAK,WAAL,CAAiB,KAAK,SAAtB;AACH;AACJ;;;;;;;AAOM,UAAS,IAAT,GAAgB,CAAG,C;;;;;;ACjG1B,0C;;;;;;ACAA,gD","file":"bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"openlayers\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PopupOverlay\"] = factory(require(\"openlayers\"));\n\telse\n\t\troot[\"ol\"] = root[\"ol\"] || {}, root[\"ol\"][\"PopupOverlay\"] = factory(root[\"ol\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 21f30f6b5e3bac16a1a5","/**\n * Popup overlay for OpenLayers 3 with UMD wrapper.\n * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n *\n * @author Vladimir Vershinin \n * @author Matt Walker (http://longwayaround.org.uk)\n * @author Avi Kelman \n * @licence MIT https://opensource.org/licenses/MIT\n * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org\n * @copyright (c) 2016 Matt Walker, Vladimir Vershinin\n */\nimport Popup from './Popup';\nimport './popup.scss';\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import ol from \"openlayers\";\nimport * as util from \"./util\";\nimport * as easing from \"./easing\";\n\n/**\n * @typedef {Object} PopupOptions\n * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n * A positive value shifts the overlay down. Default is `[0, 0]`.\n * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n * Default is `top-left`.\n * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n * Default is `true`. If the overlay is placed in the same container as that of the controls\n * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n * The default is `true`.\n * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n * This animation is only used when `autoPan` is enabled.\n * Default is `{ duration: 300, easing: easeInOutCubic }`.\n * If set to `null` the panning is not animated.\n * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n */\nvar PopupOptions;\n\n/**\n * @enum {string}\n * @private\n */\nconst PopupEventType = {\n /**\n * Triggered upon popup open.\n * @event Popup#show\n */\n SHOW: \"show\",\n /**\n * Triggered upon popup close.\n * @event Popup#hide\n */\n HIDE: \"hide\"\n};\n\n/**\n * Popup Overlay for OpenLayer 3.\n */\nexport default class Popup extends ol.Overlay {\n /**\n * @param {PopupOptions} [options] Popup options.\n */\n constructor(options = {}) {\n const element = createDOMElement();\n\n options.autoPan = util.coalesce(options.autoPan, true);\n options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n duration: 300,\n easing: easing.easeInOutCubic\n });\n\n super({\n ...options,\n element\n });\n\n /**\n * @type {function}\n * @private\n */\n this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n /**\n * @type {function}\n * @private\n */\n this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n /**\n * @type {Element}\n * @private\n */\n this.content_ = this.getElement().querySelector('.ol-popup-content');\n /**\n * @type {Element}\n * @private\n */\n this.closer_ = this.getElement().querySelector('.ol-popup-closer');\n /**\n * @type {Object}\n * @private\n */\n this.eventListeners_ = {};\n\n enableTouchScroll(this.content_);\n\n if (options.content) {\n this.content = options.content;\n }\n }\n\n //noinspection JSAnnotator\n /**\n * @type {HTMLCollection} Inner content of popup.\n */\n set content(content) {\n this.setContent(content);\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @type {Element} Inner content of popup.\n */\n get content() {\n return this.getContent();\n }\n\n /**\n * @param {Element | HTMLCollection | string} content Update popup inner content.\n */\n setContent(content) {\n util.emptyElement(this.content_);\n\n if (util.isElement(content)) {\n this.content_.appendChild(content);\n } else if (util.isString(content)) {\n this.content_.insertAdjacentHTML('afterBegin', content);\n } else if (util.isArrayLike(content)) {\n util.toArray(content).forEach(elem => this.content_.appendChild(elem));\n }\n }\n\n /**\n * @returns {Element} Inner content of popup.\n */\n getContent() {\n return this.content_;\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @param {ol.Map} map OpenLayers map object.\n */\n setMap(map) {\n super.setMap(map);\n\n if (map) {\n this.bindEvents_();\n this.bringToFront();\n } else {\n this.unbindEvents_();\n }\n }\n\n /**\n * Show on top of other popups.\n */\n bringToFront() {\n const container = this.getElement().parentNode;\n const overlaysContainer = container.parentNode;\n const lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\n if (lastOverlay && lastOverlay !== container) {\n overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n }\n }\n\n /**\n * Shows popup.\n *\n * @param {ol.Coordinate} [coordinate] New popup position.\n * @param {Element | HTMLCollection | string} [content] Replace inner content.\n * @return {Promise} Returns Promise that resolves when showing completes.\n * @fires Popup#show Show event.\n */\n show(coordinate, content) {\n if (content) {\n this.content = content;\n }\n\n const elem = this.getElement();\n elem.style.display = \"block\";\n elem.style.visibility = \"hidden\";\n\n if (coordinate) {\n this.setPosition(coordinate);\n }\n\n return Promise.resolve(this.beforeShow_(this))\n .then(() => {\n elem.style.visibility = \"visible\";\n /**\n * Show event.\n *\n * @event Popup#show\n */\n this.dispatchEvent(PopupEventType.SHOW);\n this.set(\"visible\", true);\n });\n }\n\n /**\n * Hides popup.\n *\n * @return {Promise} Returns Promise that resolves when hiding completes.\n * @fires Popup#hide Hide event.\n */\n hide() {\n this.closer_.blur();\n\n return Promise.resolve(this.beforeHide_(this))\n .then(() => {\n this.getElement().style.display = \"none\";\n /**\n * Hide event.\n *\n * @event Popup#hide\n */\n this.dispatchEvent(PopupEventType.HIDE);\n this.set(\"visible\", false);\n });\n }\n\n /**\n * @private\n */\n bindEvents_() {\n this.listenEvent_('closerclick', this.closer_, 'click', evt => {\n evt.preventDefault();\n this.hide();\n });\n\n const elemListener = ::this.bringToFront;\n [\"click\", \"focus\"].forEach(eventName => this.listenEvent_('elem' + eventName, this.getElement(), eventName, elemListener));\n }\n\n /**\n * @private\n */\n unbindEvents_() {\n Object.keys(this.eventListeners_).forEach(::this.unlistenEvent_);\n }\n\n /**\n * @param {string} name Unique name\n * @param {Element} target\n * @param {string} event\n * @param {function} listener\n * @private\n */\n listenEvent_(name, target, event, listener) {\n if (this.eventListeners_[name]) {\n this.unlistenEvent_(name);\n }\n\n target.addEventListener(event, listener);\n\n this.eventListeners_[name] = {\n target,\n event,\n listener\n };\n }\n\n /**\n * @param {string} name Unique name\n * @private\n */\n unlistenEvent_(name) {\n if (this.eventListeners_[name]) {\n const { target, event, listener } = this.eventListeners_[name];\n\n target.removeEventListener(event, listener);\n }\n }\n}\n\n/**\n * @return {Element}\n * @private\n */\nfunction createDOMElement() {\n const element = util.createElement('div', 'ol-popup');\n const closer = util.createElement('a', 'ol-popup-closer', {\n href: '#'\n });\n\n element.appendChild(closer);\n\n // append content container\n const content = util.createElement('div', 'ol-popup-content');\n element.appendChild(content);\n\n return element;\n}\n\n/**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction isTouchDevice() {\n try {\n document.createEvent(\"TouchEvent\");\n\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction enableTouchScroll(elm) {\n if (isTouchDevice()) {\n let scrollStartPos = 0;\n\n elm.addEventListener(\"touchstart\", function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n\n elm.addEventListener(\"touchmove\", function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Popup.js","/**\n * Easing functions pack\n */\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInQuad(t) {\n return t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutQuad(t) {\n return t * (2 - t);\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutQuad(t) {\n return t < .5 ?\n 2 * t * t :\n -1 + (4 - 2 * t) * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInCubic(t) {\n return t * t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutCubic(t) {\n return (--t) * t * t + 1;\n}\n\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutCubic(t) {\n return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/easing.js","/**\n * @param {*} arg1 Value to check.\n * @param {*} arg2 Value to check.\n * @param {...*} [args] Values to check.\n * @return {*} First argument that is not equal `undefined` or `null`\n */\nexport function coalesce(arg1, arg2, ...args) {\n return [].slice.call(arguments).find(value => value != null);\n}\n\n/**\n * @param {*} value\n * @return {Array}\n */\nexport function toArray(value) {\n return isArrayLike(value) ? [].slice.call(value) : [];\n}\n\n/**\n * @param {string} tagName\n * @param {string|string[]} [classes] CSS classes.\n * @param {Object} [attributes] Element attributes.\n * @returns {Element}\n */\nexport function createElement(tagName, classes, attributes) {\n const elem = document.createElement(tagName);\n\n if (classes) {\n elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n }\n\n if (attributes) {\n Object.keys(attributes).forEach(attribute => elem.setAttribute(attribute, attributes[attribute]));\n }\n\n return elem;\n}\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n */\nexport function isElement(value) {\n return !!value && isObject(value) && value.nodeType === 1;\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n */\nexport function isObject(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * Checks if `value` is likely a string.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n */\nexport function isString(value) {\n return value != null && (\n typeof value === 'string' ||\n isObject(value) && Object.prototype.toString.call(value) === '[object String]'\n );\n}\n\n/**\n * Checks if `value` is Array like object.\n *\n * @param value\n * @returns {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n */\nexport function isArrayLike(value) {\n return !!value && typeof value.length === 'number';\n}\n\n/**\n * @param {Element} elem\n */\nexport function emptyElement(elem) {\n while (elem.hasChildNodes()) {\n elem.removeChild(elem.lastChild);\n }\n}\n\n/**\n * Empty function\n *\n * @return void\n */\nexport function noop() { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/util.js","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/popup.scss\n// module id = 4\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}\n// module id = 5\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap 81480968f490128fa439","webpack:///./src/index.js","webpack:///./src/Popup.js","webpack:///./src/easing.js","webpack:///./src/util.js","webpack:///./src/popup.scss","webpack:///external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}"],"names":["util","easing","PopupOptions","PopupEventType","SHOW","HIDE","Popup","options","element","createDOMElement","autoPan","coalesce","autoPanAnimation","duration","easeInOutCubic","beforeShow_","beforeShow","noop","beforeHide_","beforeHide","content_","getElement","querySelector","closer_","eventListeners_","enableTouchScroll","content","emptyElement","isElement","appendChild","isString","insertAdjacentHTML","isArrayLike","toArray","forEach","elem","map","bindEvents_","bringToFront","unbindEvents_","container","parentNode","overlaysContainer","lastOverlay","querySelectorAll","pop","insertBefore","nextSibling","coordinate","style","display","visibility","setPosition","Promise","resolve","then","dispatchEvent","set","blur","listenEvent_","evt","preventDefault","hide","elemListener","eventName","Object","keys","unlistenEvent_","name","target","event","listener","addEventListener","removeEventListener","setContent","getContent","Overlay","createElement","closer","href","isTouchDevice","document","createEvent","e","elm","scrollStartPos","scrollTop","touches","pageY","easeInQuad","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","t","isObject","arg1","arg2","args","slice","call","arguments","find","value","tagName","classes","attributes","classList","add","apply","split","setAttribute","attribute","nodeType","prototype","toString","length","hasChildNodes","removeChild","lastChild"],"mappings":";;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B;AAC/B,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uBAAe;AACf;AACA;AAC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AA6B;AACzBlF,cAAKmF,WAAL,CAAiBnF,KAAKoF,SAAtB;AACH;AACJ;;AAED;;;;;AAKO,UAAStG,IAAT,GAAgB,CAAG,C;;;;;;ACjG1B,0C;;;;;;ACAA,gD","file":"bundle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"openlayers\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PopupOverlay\"] = factory(require(\"openlayers\"));\n\telse\n\t\troot[\"ol\"] = root[\"ol\"] || {}, root[\"ol\"][\"PopupOverlay\"] = factory(root[\"ol\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 81480968f490128fa439","/**\n * Popup overlay for OpenLayers 3 with UMD wrapper.\n * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n *\n * @author Vladimir Vershinin \n * @author Matt Walker (http://longwayaround.org.uk)\n * @author Avi Kelman \n * @licence MIT https://opensource.org/licenses/MIT\n * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin\n */\nimport Popup from './Popup';\nimport './popup.scss';\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import ol from \"openlayers\";\nimport * as util from \"./util\";\nimport * as easing from \"./easing\";\n\n/**\n * @typedef {Object} PopupOptions\n * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n * A positive value shifts the overlay down. Default is `[0, 0]`.\n * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n * Default is `top-left`.\n * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n * Default is `true`. If the overlay is placed in the same container as that of the controls\n * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n * The default is `true`.\n * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n * This animation is only used when `autoPan` is enabled.\n * Default is `{ duration: 300, easing: easeInOutCubic }`.\n * If set to `null` the panning is not animated.\n * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n */\nvar PopupOptions;\n\n/**\n * @enum {string}\n * @private\n */\nconst PopupEventType = {\n /**\n * Triggered upon popup open.\n * @event Popup#show\n */\n SHOW: \"show\",\n /**\n * Triggered upon popup close.\n * @event Popup#hide\n */\n HIDE: \"hide\"\n};\n\n/**\n * Popup Overlay for OpenLayers.\n */\nexport default class Popup extends ol.Overlay {\n /**\n * @param {PopupOptions} [options] Popup options.\n */\n constructor(options = {}) {\n const element = createDOMElement();\n\n options.autoPan = util.coalesce(options.autoPan, true);\n options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n duration: 300,\n easing: easing.easeInOutCubic\n });\n\n super({\n ...options,\n element\n });\n\n /**\n * @type {function}\n * @private\n */\n this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n /**\n * @type {function}\n * @private\n */\n this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n /**\n * @type {Element}\n * @private\n */\n this.content_ = this.getElement().querySelector('.ol-popup-content');\n /**\n * @type {Element}\n * @private\n */\n this.closer_ = this.getElement().querySelector('.ol-popup-closer');\n /**\n * @type {Object}\n * @private\n */\n this.eventListeners_ = {};\n\n enableTouchScroll(this.content_);\n\n if (options.content) {\n this.content = options.content;\n }\n }\n\n //noinspection JSAnnotator\n /**\n * @type {HTMLCollection} Inner content of popup.\n */\n set content(content) {\n this.setContent(content);\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @type {Element} Inner content of popup.\n */\n get content() {\n return this.getContent();\n }\n\n /**\n * @param {Element | HTMLCollection | string} content Update popup inner content.\n */\n setContent(content) {\n util.emptyElement(this.content_);\n\n if (util.isElement(content)) {\n this.content_.appendChild(content);\n } else if (util.isString(content)) {\n this.content_.insertAdjacentHTML('afterBegin', content);\n } else if (util.isArrayLike(content)) {\n util.toArray(content).forEach(elem => this.content_.appendChild(elem));\n }\n }\n\n /**\n * @returns {Element} Inner content of popup.\n */\n getContent() {\n return this.content_;\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @param {ol.Map} map OpenLayers map object.\n */\n setMap(map) {\n super.setMap(map);\n\n if (map) {\n this.bindEvents_();\n this.bringToFront();\n } else {\n this.unbindEvents_();\n }\n }\n\n /**\n * Show on top of other popups.\n */\n bringToFront() {\n const container = this.getElement().parentNode;\n const overlaysContainer = container.parentNode;\n const lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\n if (lastOverlay && lastOverlay !== container) {\n overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n }\n }\n\n /**\n * Shows popup.\n *\n * @param {ol.Coordinate} [coordinate] New popup position.\n * @param {Element | HTMLCollection | string} [content] Replace inner content.\n * @return {Promise} Returns Promise that resolves when showing completes.\n * @fires Popup#show Show event.\n */\n show(coordinate, content) {\n if (content) {\n this.content = content;\n }\n\n const elem = this.getElement();\n elem.style.display = \"block\";\n elem.style.visibility = \"hidden\";\n\n if (coordinate) {\n this.setPosition(coordinate);\n }\n\n return Promise.resolve(this.beforeShow_(this))\n .then(() => {\n elem.style.visibility = \"visible\";\n /**\n * Show event.\n *\n * @event Popup#show\n */\n this.dispatchEvent(PopupEventType.SHOW);\n this.set(\"visible\", true);\n });\n }\n\n /**\n * Hides popup.\n *\n * @return {Promise} Returns Promise that resolves when hiding completes.\n * @fires Popup#hide Hide event.\n */\n hide() {\n this.closer_.blur();\n\n return Promise.resolve(this.beforeHide_(this))\n .then(() => {\n this.getElement().style.display = \"none\";\n /**\n * Hide event.\n *\n * @event Popup#hide\n */\n this.dispatchEvent(PopupEventType.HIDE);\n this.set(\"visible\", false);\n });\n }\n\n /**\n * @private\n */\n bindEvents_() {\n this.listenEvent_('closerclick', this.closer_, 'click', evt => {\n evt.preventDefault();\n this.hide();\n });\n\n const elemListener = ::this.bringToFront;\n [\"click\", \"focus\"].forEach(eventName => this.listenEvent_('elem' + eventName, this.getElement(), eventName, elemListener));\n }\n\n /**\n * @private\n */\n unbindEvents_() {\n Object.keys(this.eventListeners_).forEach(::this.unlistenEvent_);\n }\n\n /**\n * @param {string} name Unique name\n * @param {Element} target\n * @param {string} event\n * @param {function} listener\n * @private\n */\n listenEvent_(name, target, event, listener) {\n if (this.eventListeners_[name]) {\n this.unlistenEvent_(name);\n }\n\n target.addEventListener(event, listener);\n\n this.eventListeners_[name] = {\n target,\n event,\n listener\n };\n }\n\n /**\n * @param {string} name Unique name\n * @private\n */\n unlistenEvent_(name) {\n if (this.eventListeners_[name]) {\n const { target, event, listener } = this.eventListeners_[name];\n\n target.removeEventListener(event, listener);\n }\n }\n}\n\n/**\n * @return {Element}\n * @private\n */\nfunction createDOMElement() {\n const element = util.createElement('div', 'ol-popup');\n const closer = util.createElement('a', 'ol-popup-closer', {\n href: '#'\n });\n\n element.appendChild(closer);\n\n // append content container\n const content = util.createElement('div', 'ol-popup-content');\n element.appendChild(content);\n\n return element;\n}\n\n/**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction isTouchDevice() {\n try {\n document.createEvent(\"TouchEvent\");\n\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction enableTouchScroll(elm) {\n if (isTouchDevice()) {\n let scrollStartPos = 0;\n\n elm.addEventListener(\"touchstart\", function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n\n elm.addEventListener(\"touchmove\", function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Popup.js","/**\n * Easing functions pack\n */\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInQuad(t) {\n return t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutQuad(t) {\n return t * (2 - t);\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutQuad(t) {\n return t < .5 ?\n 2 * t * t :\n -1 + (4 - 2 * t) * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInCubic(t) {\n return t * t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutCubic(t) {\n return (--t) * t * t + 1;\n}\n\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutCubic(t) {\n return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/easing.js","/**\n * @param {*} arg1 Value to check.\n * @param {*} arg2 Value to check.\n * @param {...*} [args] Values to check.\n * @return {*} First argument that is not equal `undefined` or `null`\n */\nexport function coalesce(arg1, arg2, ...args) {\n return [].slice.call(arguments).find(value => value != null);\n}\n\n/**\n * @param {*} value\n * @return {Array}\n */\nexport function toArray(value) {\n return isArrayLike(value) ? [].slice.call(value) : [];\n}\n\n/**\n * @param {string} tagName\n * @param {string|string[]} [classes] CSS classes.\n * @param {Object} [attributes] Element attributes.\n * @returns {Element}\n */\nexport function createElement(tagName, classes, attributes) {\n const elem = document.createElement(tagName);\n\n if (classes) {\n elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n }\n\n if (attributes) {\n Object.keys(attributes).forEach(attribute => elem.setAttribute(attribute, attributes[attribute]));\n }\n\n return elem;\n}\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n */\nexport function isElement(value) {\n return !!value && isObject(value) && value.nodeType === 1;\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n */\nexport function isObject(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * Checks if `value` is likely a string.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n */\nexport function isString(value) {\n return value != null && (\n typeof value === 'string' ||\n isObject(value) && Object.prototype.toString.call(value) === '[object String]'\n );\n}\n\n/**\n * Checks if `value` is Array like object.\n *\n * @param value\n * @returns {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n */\nexport function isArrayLike(value) {\n return !!value && typeof value.length === 'number';\n}\n\n/**\n * @param {Element} elem\n */\nexport function emptyElement(elem) {\n while (elem.hasChildNodes()) {\n elem.removeChild(elem.lastChild);\n }\n}\n\n/**\n * Empty function\n *\n * @return void\n */\nexport function noop() { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/util.js","// removed by extract-text-webpack-plugin\n\n\n//////////////////\n// WEBPACK FOOTER\n// ./src/popup.scss\n// module id = 4\n// module chunks = 0","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}\n// module id = 5\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/bundle.min.css b/dist/bundle.min.css index 220cf02..8cc3c04 100644 --- a/dist/bundle.min.css +++ b/dist/bundle.min.css @@ -1,14 +1,13 @@ /*! - * Popup overlay for OpenLayers 3 with UMD wrapper + * Popup overlay for OpenLayers with UMD wrapper * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup * - * @package ol3-popup-umd - * @author Vladimir Vershinin (https://github.com/ghettovoice) + * @package ol-popup-umd + * @author Vladimir Vershinin * @author Matt Walker (http://longwayaround.org.uk),@author Avi Kelman - * @version 1.3.0 + * @version 1.3.1 * @licence MIT https://opensource.org/licenses/MIT - * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org - * @copyright (c) 2016 Matt Walker, Vladimir Vershinin (https://github.com/ghettovoice) + * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ .ol-popup{display:none;position:absolute;background-color:#fff;padding:20px;border:1px solid #ccc;bottom:12px;left:-50px;box-shadow:2px 2px 10px rgba(0,0,0,.2)}.ol-popup:after,.ol-popup:before{top:100%;border:solid transparent;content:" ";height:0;width:0;position:absolute;pointer-events:none}.ol-popup:after{border-top-color:#fff;border-width:10px;left:48px;margin-left:-10px}.ol-popup:before{border-top-color:#ccc;border-width:11px;left:48px;margin-left:-11px}.ol-popup .ol-popup-content{min-width:170px;max-height:50vh;overflow-x:hidden;overflow-y:auto}.ol-popup .ol-popup-content h3{margin:.25em 0}.ol-popup .ol-popup-closer{position:absolute;top:0;right:0;font-size:150%;padding:0 4px;color:gray;text-decoration:none}.ol-popup .ol-popup-closer:after{content:"\2716"}.ol-popup .infoResult{min-width:130px}.ol-popup .infoResult p{padding:.1em;margin:0}.ol-popup .marker{margin-bottom:30px} /*# sourceMappingURL=bundle.min.css.map*/ \ No newline at end of file diff --git a/dist/bundle.min.css.map b/dist/bundle.min.css.map index 59011c9..7501cbf 100644 --- a/dist/bundle.min.css.map +++ b/dist/bundle.min.css.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack:///src/src/popup.scss"],"names":[],"mappings":";;;;;;;;;;;;AAAA,UACI,aACA,kBACA,sBACA,aACA,sBACA,YACA,WACA,sCAAoC,CARxC,iCAWQ,SACA,yBACA,YACA,SACA,QACA,kBACA,mBAAsB,CAjB9B,gBAqBQ,sBACA,kBACA,UACA,iBAAyB,CAxBjC,iBA4BQ,sBACA,kBACA,UACA,iBAAyB,CA/BjC,4BAmCQ,gBACA,gBACA,kBACA,eAAkB,CAtC1B,+BAyCY,cAAkB,CAzC9B,2BA8CQ,kBACA,MACA,QACA,eACA,cACA,WACA,oBAAuB,CApD/B,iCAuDY,eAAkB,CAvD9B,sBA4DQ,eAAkB,CA5D1B,wBA+DY,aACA,QAAY,CAhExB,kBAqEQ,kBAAqB","file":"bundle.min.css","sourcesContent":[".ol-popup {\n display : none;\n position : absolute;\n background-color : white;\n padding : 20px;\n border : 1px solid #cccccc;\n bottom : 12px;\n left : -50px;\n box-shadow : 2px 2px 10px rgba(0, 0, 0, 0.2);\n\n &:after, &:before {\n top : 100%;\n border : solid transparent;\n content : \" \";\n height : 0;\n width : 0;\n position : absolute;\n pointer-events : none;\n }\n\n &:after {\n border-top-color : white;\n border-width : 10px;\n left : 48px;\n margin-left : -10px;\n }\n\n &:before {\n border-top-color : #cccccc;\n border-width : 11px;\n left : 48px;\n margin-left : -11px;\n }\n\n .ol-popup-content {\n min-width : 170px;\n max-height : 50vh;\n overflow-x : hidden;\n overflow-y : auto;\n\n h3 {\n margin : 0.25em 0;\n }\n }\n\n .ol-popup-closer {\n position : absolute;\n top : 0;\n right : 0;\n font-size : 150%;\n padding : 0 4px;\n color : gray;\n text-decoration : none;\n\n &:after {\n content : \"\\2716\";\n }\n }\n\n .infoResult {\n min-width : 130px;\n\n p {\n padding : 0.1em;\n margin : 0;\n }\n }\n\n .marker {\n margin-bottom : 30px;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// webpack:///src/src/popup.scss"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack:///src/src/popup.scss"],"names":[],"mappings":";;;;;;;;;;;AAAA,UACI,aACA,kBACA,sBACA,aACA,sBACA,YACA,WACA,sCAAoC,CARxC,iCAWQ,SACA,yBACA,YACA,SACA,QACA,kBACA,mBAAsB,CAjB9B,gBAqBQ,sBACA,kBACA,UACA,iBAAyB,CAxBjC,iBA4BQ,sBACA,kBACA,UACA,iBAAyB,CA/BjC,4BAmCQ,gBACA,gBACA,kBACA,eAAkB,CAtC1B,+BAyCY,cAAkB,CAzC9B,2BA8CQ,kBACA,MACA,QACA,eACA,cACA,WACA,oBAAuB,CApD/B,iCAuDY,eAAkB,CAvD9B,sBA4DQ,eAAkB,CA5D1B,wBA+DY,aACA,QAAY,CAhExB,kBAqEQ,kBAAqB","file":"bundle.min.css","sourcesContent":[".ol-popup {\n display : none;\n position : absolute;\n background-color : white;\n padding : 20px;\n border : 1px solid #cccccc;\n bottom : 12px;\n left : -50px;\n box-shadow : 2px 2px 10px rgba(0, 0, 0, 0.2);\n\n &:after, &:before {\n top : 100%;\n border : solid transparent;\n content : \" \";\n height : 0;\n width : 0;\n position : absolute;\n pointer-events : none;\n }\n\n &:after {\n border-top-color : white;\n border-width : 10px;\n left : 48px;\n margin-left : -10px;\n }\n\n &:before {\n border-top-color : #cccccc;\n border-width : 11px;\n left : 48px;\n margin-left : -11px;\n }\n\n .ol-popup-content {\n min-width : 170px;\n max-height : 50vh;\n overflow-x : hidden;\n overflow-y : auto;\n\n h3 {\n margin : 0.25em 0;\n }\n }\n\n .ol-popup-closer {\n position : absolute;\n top : 0;\n right : 0;\n font-size : 150%;\n padding : 0 4px;\n color : gray;\n text-decoration : none;\n\n &:after {\n content : \"\\2716\";\n }\n }\n\n .infoResult {\n min-width : 130px;\n\n p {\n padding : 0.1em;\n margin : 0;\n }\n }\n\n .marker {\n margin-bottom : 30px;\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// webpack:///src/src/popup.scss"],"sourceRoot":""} \ No newline at end of file diff --git a/dist/bundle.min.js b/dist/bundle.min.js index 3c82cef..df3ea0d 100644 --- a/dist/bundle.min.js +++ b/dist/bundle.min.js @@ -1,14 +1,13 @@ /*! -Popup overlay for OpenLayers 3 with UMD wrapper +Popup overlay for OpenLayers with UMD wrapper Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup -@package ol3-popup-umd -@author Vladimir Vershinin (https://github.com/ghettovoice) +@package ol-popup-umd +@author Vladimir Vershinin @author Matt Walker (http://longwayaround.org.uk),@author Avi Kelman -@version 1.3.0 +@version 1.3.1 @licence MIT https://opensource.org/licenses/MIT - Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org -@copyright (c) 2016 Matt Walker, Vladimir Vershinin (https://github.com/ghettovoice) +@copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("openlayers")):"function"==typeof define&&define.amd?define(["openlayers"],t):"object"==typeof exports?exports.PopupOverlay=t(require("openlayers")):(e.ol=e.ol||{},e.ol.PopupOverlay=t(e.ol))}(this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="/dist/",t(0)}([function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=o(r);n(4),t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(){var e=b.createElement("div","ol-popup"),t=b.createElement("a","ol-popup-closer",{href:"#"});e.appendChild(t);var n=b.createElement("div","ol-popup-content");return e.appendChild(n),e}function l(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}function a(e){l()&&!function(){var t=0;e.addEventListener("touchstart",function(e){t=this.scrollTop+e.touches[0].pageY},!1),e.addEventListener("touchmove",function(e){this.scrollTop=t-e.touches[0].pageY},!1)}()}Object.defineProperty(t,"__esModule",{value:!0});var f=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=c();e.autoPan=b.coalesce(e.autoPan,!0),e.autoPanAnimation=b.coalesce(e.autoPanAnimation,{duration:300,easing:m.easeInOutCubic});var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f({},e,{element:n})));return o.beforeShow_=b.coalesce(e.beforeShow,b.noop),o.beforeHide_=b.coalesce(e.beforeHide,b.noop),o.content_=o.getElement().querySelector(".ol-popup-content"),o.closer_=o.getElement().querySelector(".ol-popup-closer"),o.eventListeners_={},a(o.content_),e.content&&(o.content=e.content),o}return s(t,e),p(t,[{key:"setContent",value:function(e){var t=this;b.emptyElement(this.content_),b.isElement(e)?this.content_.appendChild(e):b.isString(e)?this.content_.insertAdjacentHTML("afterBegin",e):b.isArrayLike(e)&&b.toArray(e).forEach(function(e){return t.content_.appendChild(e)})}},{key:"getContent",value:function(){return this.content_}},{key:"setMap",value:function(e){v(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setMap",this).call(this,e),e?(this.bindEvents_(),this.bringToFront()):this.unbindEvents_()}},{key:"bringToFront",value:function(){var e=this.getElement().parentNode,t=e.parentNode,n=b.toArray(t.querySelectorAll(".ol-overlay-container")).pop();n&&n!==e&&t.insertBefore(e,n.nextSibling)}},{key:"show",value:function(e,t){var n=this;t&&(this.content=t);var o=this.getElement();return o.style.display="block",o.style.visibility="hidden",e&&this.setPosition(e),Promise.resolve(this.beforeShow_(this)).then(function(){o.style.visibility="visible",n.dispatchEvent(E.SHOW),n.set("visible",!0)})}},{key:"hide",value:function(){var e=this;return this.closer_.blur(),Promise.resolve(this.beforeHide_(this)).then(function(){e.getElement().style.display="none",e.dispatchEvent(E.HIDE),e.set("visible",!1)})}},{key:"bindEvents_",value:function(){var e=this;this.listenEvent_("closerclick",this.closer_,"click",function(t){t.preventDefault(),e.hide()});var t=this.bringToFront.bind(this);["click","focus"].forEach(function(n){return e.listenEvent_("elem"+n,e.getElement(),n,t)})}},{key:"unbindEvents_",value:function(){Object.keys(this.eventListeners_).forEach(this.unlistenEvent_.bind(this))}},{key:"listenEvent_",value:function(e,t,n,o){this.eventListeners_[e]&&this.unlistenEvent_(e),t.addEventListener(n,o),this.eventListeners_[e]={target:t,event:n,listener:o}}},{key:"unlistenEvent_",value:function(e){if(this.eventListeners_[e]){var t=this.eventListeners_[e],n=t.target,o=t.event,r=t.listener;n.removeEventListener(o,r)}}},{key:"content",set:function(e){this.setContent(e)},get:function(){return this.getContent()}}]),t}(y.default.Overlay);t.default=g,e.exports=t.default},function(e,t){"use strict";function n(e){return e*e}function o(e){return e*(2-e)}function r(e){return e<.5?2*e*e:-1+(4-2*e)*e}function i(e){return e*e*e}function u(e){return--e*e*e+1}function s(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}Object.defineProperty(t,"__esModule",{value:!0}),t.easeInQuad=n,t.easeOutQuad=o,t.easeInOutQuad=r,t.easeInCubic=i,t.easeOutCubic=u,t.easeInOutCubic=s},function(e,t){"use strict";function n(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,t);var n=c();e.autoPan=b.coalesce(e.autoPan,!0),e.autoPanAnimation=b.coalesce(e.autoPanAnimation,{duration:300,easing:m.easeInOutCubic});var o=u(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,f({},e,{element:n})));return o.beforeShow_=b.coalesce(e.beforeShow,b.noop),o.beforeHide_=b.coalesce(e.beforeHide,b.noop),o.content_=o.getElement().querySelector(".ol-popup-content"),o.closer_=o.getElement().querySelector(".ol-popup-closer"),o.eventListeners_={},a(o.content_),e.content&&(o.content=e.content),o}return s(t,e),p(t,[{key:"setContent",value:function(e){var t=this;b.emptyElement(this.content_),b.isElement(e)?this.content_.appendChild(e):b.isString(e)?this.content_.insertAdjacentHTML("afterBegin",e):b.isArrayLike(e)&&b.toArray(e).forEach(function(e){return t.content_.appendChild(e)})}},{key:"getContent",value:function(){return this.content_}},{key:"setMap",value:function(e){v(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setMap",this).call(this,e),e?(this.bindEvents_(),this.bringToFront()):this.unbindEvents_()}},{key:"bringToFront",value:function(){var e=this.getElement().parentNode,t=e.parentNode,n=b.toArray(t.querySelectorAll(".ol-overlay-container")).pop();n&&n!==e&&t.insertBefore(e,n.nextSibling)}},{key:"show",value:function(e,t){var n=this;t&&(this.content=t);var o=this.getElement();return o.style.display="block",o.style.visibility="hidden",e&&this.setPosition(e),Promise.resolve(this.beforeShow_(this)).then(function(){o.style.visibility="visible",n.dispatchEvent(E.SHOW),n.set("visible",!0)})}},{key:"hide",value:function(){var e=this;return this.closer_.blur(),Promise.resolve(this.beforeHide_(this)).then(function(){e.getElement().style.display="none",e.dispatchEvent(E.HIDE),e.set("visible",!1)})}},{key:"bindEvents_",value:function(){var e=this;this.listenEvent_("closerclick",this.closer_,"click",function(t){t.preventDefault(),e.hide()});var t=this.bringToFront.bind(this);["click","focus"].forEach(function(n){return e.listenEvent_("elem"+n,e.getElement(),n,t)})}},{key:"unbindEvents_",value:function(){Object.keys(this.eventListeners_).forEach(this.unlistenEvent_.bind(this))}},{key:"listenEvent_",value:function(e,t,n,o){this.eventListeners_[e]&&this.unlistenEvent_(e),t.addEventListener(n,o),this.eventListeners_[e]={target:t,event:n,listener:o}}},{key:"unlistenEvent_",value:function(e){if(this.eventListeners_[e]){var t=this.eventListeners_[e],n=t.target,o=t.event,r=t.listener;n.removeEventListener(o,r)}}},{key:"content",set:function(e){this.setContent(e)},get:function(){return this.getContent()}}]),t}(y.default.Overlay);t.default=g,e.exports=t.default},function(e,t){"use strict";function n(e){return e*e}function o(e){return e*(2-e)}function r(e){return e<.5?2*e*e:-1+(4-2*e)*e}function i(e){return e*e*e}function u(e){return--e*e*e+1}function s(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1}Object.defineProperty(t,"__esModule",{value:!0}),t.easeInQuad=n,t.easeOutQuad=o,t.easeInOutQuad=r,t.easeInCubic=i,t.easeOutCubic=u,t.easeInOutCubic=s},function(e,t){"use strict";function n(e,t){for(var n=arguments.length,o=Array(n>2?n-2:0),r=2;r\n * @version 1.3.0\n * @licence MIT https://opensource.org/licenses/MIT\n * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org\n * @copyright (c) 2016 Matt Walker, Vladimir Vershinin (https://github.com/ghettovoice)\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"openlayers\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PopupOverlay\"] = factory(require(\"openlayers\"));\n\telse\n\t\troot[\"ol\"] = root[\"ol\"] || {}, root[\"ol\"][\"PopupOverlay\"] = factory(root[\"ol\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Popup = __webpack_require__(1);\n\t\n\tvar _Popup2 = _interopRequireDefault(_Popup);\n\t\n\t__webpack_require__(4);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n\t/**\n\t * Popup overlay for OpenLayers 3 with UMD wrapper.\n\t * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n\t *\n\t * @author Vladimir Vershinin \n\t * @author Matt Walker (http://longwayaround.org.uk)\n\t * @author Avi Kelman \n\t * @licence MIT https://opensource.org/licenses/MIT\n\t * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org\n\t * @copyright (c) 2016 Matt Walker, Vladimir Vershinin\n\t */\n\texports.default = _Popup2.default;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _openlayers = __webpack_require__(5);\n\t\n\tvar _openlayers2 = _interopRequireDefault(_openlayers);\n\t\n\tvar _util = __webpack_require__(3);\n\t\n\tvar util = _interopRequireWildcard(_util);\n\t\n\tvar _easing = __webpack_require__(2);\n\t\n\tvar easing = _interopRequireWildcard(_easing);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t/**\n\t * @typedef {Object} PopupOptions\n\t * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n\t * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n\t * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n\t * A positive value shifts the overlay down. Default is `[0, 0]`.\n\t * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n\t * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n\t * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n\t * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n\t * Default is `top-left`.\n\t * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n\t * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n\t * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n\t * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n\t * Default is `true`. If the overlay is placed in the same container as that of the controls\n\t * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n\t * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n\t * The default is `true`.\n\t * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n\t * This animation is only used when `autoPan` is enabled.\n\t * Default is `{ duration: 300, easing: easeInOutCubic }`.\n\t * If set to `null` the panning is not animated.\n\t * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n\t * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n\t * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n\t * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n\t */\n\tvar PopupOptions;\n\t\n\t/**\n\t * @enum {string}\n\t * @private\n\t */\n\tvar PopupEventType = {\n\t /**\n\t * Triggered upon popup open.\n\t * @event Popup#show\n\t */\n\t SHOW: \"show\",\n\t /**\n\t * Triggered upon popup close.\n\t * @event Popup#hide\n\t */\n\t HIDE: \"hide\"\n\t};\n\t\n\t/**\n\t * Popup Overlay for OpenLayer 3.\n\t */\n\t\n\tvar Popup = function (_ol$Overlay) {\n\t _inherits(Popup, _ol$Overlay);\n\t\n\t /**\n\t * @param {PopupOptions} [options] Popup options.\n\t */\n\t\n\t function Popup() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t _classCallCheck(this, Popup);\n\t\n\t var element = createDOMElement();\n\t\n\t options.autoPan = util.coalesce(options.autoPan, true);\n\t options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n\t duration: 300,\n\t easing: easing.easeInOutCubic\n\t });\n\t\n\t /**\n\t * @type {function}\n\t * @private\n\t */\n\t\n\t var _this = _possibleConstructorReturn(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, _extends({}, options, {\n\t element: element\n\t })));\n\t\n\t _this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n\t /**\n\t * @type {function}\n\t * @private\n\t */\n\t _this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n\t /**\n\t * @type {Element}\n\t * @private\n\t */\n\t _this.content_ = _this.getElement().querySelector('.ol-popup-content');\n\t /**\n\t * @type {Element}\n\t * @private\n\t */\n\t _this.closer_ = _this.getElement().querySelector('.ol-popup-closer');\n\t /**\n\t * @type {Object}\n\t * @private\n\t */\n\t _this.eventListeners_ = {};\n\t\n\t enableTouchScroll(_this.content_);\n\t\n\t if (options.content) {\n\t _this.content = options.content;\n\t }\n\t return _this;\n\t }\n\t\n\t //noinspection JSAnnotator\n\t /**\n\t * @type {HTMLCollection} Inner content of popup.\n\t */\n\t\n\t\n\t _createClass(Popup, [{\n\t key: \"setContent\",\n\t\n\t\n\t /**\n\t * @param {Element | HTMLCollection | string} content Update popup inner content.\n\t */\n\t value: function setContent(content) {\n\t var _this2 = this;\n\t\n\t util.emptyElement(this.content_);\n\t\n\t if (util.isElement(content)) {\n\t this.content_.appendChild(content);\n\t } else if (util.isString(content)) {\n\t this.content_.insertAdjacentHTML('afterBegin', content);\n\t } else if (util.isArrayLike(content)) {\n\t util.toArray(content).forEach(function (elem) {\n\t return _this2.content_.appendChild(elem);\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * @returns {Element} Inner content of popup.\n\t */\n\t\n\t }, {\n\t key: \"getContent\",\n\t value: function getContent() {\n\t return this.content_;\n\t }\n\t\n\t //noinspection JSUnusedGlobalSymbols\n\t /**\n\t * @param {ol.Map} map OpenLayers map object.\n\t */\n\t\n\t }, {\n\t key: \"setMap\",\n\t value: function setMap(map) {\n\t _get(Popup.prototype.__proto__ || Object.getPrototypeOf(Popup.prototype), \"setMap\", this).call(this, map);\n\t\n\t if (map) {\n\t this.bindEvents_();\n\t this.bringToFront();\n\t } else {\n\t this.unbindEvents_();\n\t }\n\t }\n\t\n\t /**\n\t * Show on top of other popups.\n\t */\n\t\n\t }, {\n\t key: \"bringToFront\",\n\t value: function bringToFront() {\n\t var container = this.getElement().parentNode;\n\t var overlaysContainer = container.parentNode;\n\t var lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\t\n\t if (lastOverlay && lastOverlay !== container) {\n\t overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n\t }\n\t }\n\t\n\t /**\n\t * Shows popup.\n\t *\n\t * @param {ol.Coordinate} [coordinate] New popup position.\n\t * @param {Element | HTMLCollection | string} [content] Replace inner content.\n\t * @return {Promise} Returns Promise that resolves when showing completes.\n\t * @fires Popup#show Show event.\n\t */\n\t\n\t }, {\n\t key: \"show\",\n\t value: function show(coordinate, content) {\n\t var _this3 = this;\n\t\n\t if (content) {\n\t this.content = content;\n\t }\n\t\n\t var elem = this.getElement();\n\t elem.style.display = \"block\";\n\t elem.style.visibility = \"hidden\";\n\t\n\t if (coordinate) {\n\t this.setPosition(coordinate);\n\t }\n\t\n\t return Promise.resolve(this.beforeShow_(this)).then(function () {\n\t elem.style.visibility = \"visible\";\n\t /**\n\t * Show event.\n\t *\n\t * @event Popup#show\n\t */\n\t _this3.dispatchEvent(PopupEventType.SHOW);\n\t _this3.set(\"visible\", true);\n\t });\n\t }\n\t\n\t /**\n\t * Hides popup.\n\t *\n\t * @return {Promise} Returns Promise that resolves when hiding completes.\n\t * @fires Popup#hide Hide event.\n\t */\n\t\n\t }, {\n\t key: \"hide\",\n\t value: function hide() {\n\t var _this4 = this;\n\t\n\t this.closer_.blur();\n\t\n\t return Promise.resolve(this.beforeHide_(this)).then(function () {\n\t _this4.getElement().style.display = \"none\";\n\t /**\n\t * Hide event.\n\t *\n\t * @event Popup#hide\n\t */\n\t _this4.dispatchEvent(PopupEventType.HIDE);\n\t _this4.set(\"visible\", false);\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"bindEvents_\",\n\t value: function bindEvents_() {\n\t var _this5 = this;\n\t\n\t this.listenEvent_('closerclick', this.closer_, 'click', function (evt) {\n\t evt.preventDefault();\n\t _this5.hide();\n\t });\n\t\n\t var elemListener = this.bringToFront.bind(this);\n\t [\"click\", \"focus\"].forEach(function (eventName) {\n\t return _this5.listenEvent_('elem' + eventName, _this5.getElement(), eventName, elemListener);\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"unbindEvents_\",\n\t value: function unbindEvents_() {\n\t Object.keys(this.eventListeners_).forEach(this.unlistenEvent_.bind(this));\n\t }\n\t\n\t /**\n\t * @param {string} name Unique name\n\t * @param {Element} target\n\t * @param {string} event\n\t * @param {function} listener\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"listenEvent_\",\n\t value: function listenEvent_(name, target, event, listener) {\n\t if (this.eventListeners_[name]) {\n\t this.unlistenEvent_(name);\n\t }\n\t\n\t target.addEventListener(event, listener);\n\t\n\t this.eventListeners_[name] = {\n\t target: target,\n\t event: event,\n\t listener: listener\n\t };\n\t }\n\t\n\t /**\n\t * @param {string} name Unique name\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"unlistenEvent_\",\n\t value: function unlistenEvent_(name) {\n\t if (this.eventListeners_[name]) {\n\t var _eventListeners_$name = this.eventListeners_[name],\n\t target = _eventListeners_$name.target,\n\t event = _eventListeners_$name.event,\n\t listener = _eventListeners_$name.listener;\n\t\n\t\n\t target.removeEventListener(event, listener);\n\t }\n\t }\n\t }, {\n\t key: \"content\",\n\t set: function set(content) {\n\t this.setContent(content);\n\t }\n\t\n\t //noinspection JSUnusedGlobalSymbols\n\t /**\n\t * @type {Element} Inner content of popup.\n\t */\n\t ,\n\t get: function get() {\n\t return this.getContent();\n\t }\n\t }]);\n\t\n\t return Popup;\n\t}(_openlayers2.default.Overlay);\n\t\n\t/**\n\t * @return {Element}\n\t * @private\n\t */\n\t\n\t\n\texports.default = Popup;\n\tfunction createDOMElement() {\n\t var element = util.createElement('div', 'ol-popup');\n\t var closer = util.createElement('a', 'ol-popup-closer', {\n\t href: '#'\n\t });\n\t\n\t element.appendChild(closer);\n\t\n\t // append content container\n\t var content = util.createElement('div', 'ol-popup-content');\n\t element.appendChild(content);\n\t\n\t return element;\n\t}\n\t\n\t/**\n\t * Determine if the current browser supports touch events. Adapted from\n\t * https://gist.github.com/chrismbarr/4107472\n\t * @private\n\t */\n\tfunction isTouchDevice() {\n\t try {\n\t document.createEvent(\"TouchEvent\");\n\t\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\t\n\t/**\n\t * Apply workaround to enable scrolling of overflowing content within an\n\t * element. Adapted from https://gist.github.com/chrismbarr/4107472\n\t * @private\n\t */\n\tfunction enableTouchScroll(elm) {\n\t if (isTouchDevice()) {\n\t (function () {\n\t var scrollStartPos = 0;\n\t\n\t elm.addEventListener(\"touchstart\", function (event) {\n\t scrollStartPos = this.scrollTop + event.touches[0].pageY;\n\t }, false);\n\t\n\t elm.addEventListener(\"touchmove\", function (event) {\n\t this.scrollTop = scrollStartPos - event.touches[0].pageY;\n\t }, false);\n\t })();\n\t }\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.easeInQuad = easeInQuad;\n\texports.easeOutQuad = easeOutQuad;\n\texports.easeInOutQuad = easeInOutQuad;\n\texports.easeInCubic = easeInCubic;\n\texports.easeOutCubic = easeOutCubic;\n\texports.easeInOutCubic = easeInOutCubic;\n\t/**\n\t * Easing functions pack\n\t */\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInQuad(t) {\n\t return t * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeOutQuad(t) {\n\t return t * (2 - t);\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInOutQuad(t) {\n\t return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInCubic(t) {\n\t return t * t * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeOutCubic(t) {\n\t return --t * t * t + 1;\n\t}\n\t\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInOutCubic(t) {\n\t return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n\t}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol ? \"symbol\" : typeof obj; };\n\t\n\texports.coalesce = coalesce;\n\texports.toArray = toArray;\n\texports.createElement = createElement;\n\texports.isElement = isElement;\n\texports.isObject = isObject;\n\texports.isString = isString;\n\texports.isArrayLike = isArrayLike;\n\texports.emptyElement = emptyElement;\n\texports.noop = noop;\n\t/**\n\t * @param {*} arg1 Value to check.\n\t * @param {*} arg2 Value to check.\n\t * @param {...*} [args] Values to check.\n\t * @return {*} First argument that is not equal `undefined` or `null`\n\t */\n\tfunction coalesce(arg1, arg2) {\n\t for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t args[_key - 2] = arguments[_key];\n\t }\n\t\n\t return [].slice.call(arguments).find(function (value) {\n\t return value != null;\n\t });\n\t}\n\t\n\t/**\n\t * @param {*} value\n\t * @return {Array}\n\t */\n\tfunction toArray(value) {\n\t return isArrayLike(value) ? [].slice.call(value) : [];\n\t}\n\t\n\t/**\n\t * @param {string} tagName\n\t * @param {string|string[]} [classes] CSS classes.\n\t * @param {Object} [attributes] Element attributes.\n\t * @returns {Element}\n\t */\n\tfunction createElement(tagName, classes, attributes) {\n\t var elem = document.createElement(tagName);\n\t\n\t if (classes) {\n\t elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n\t }\n\t\n\t if (attributes) {\n\t Object.keys(attributes).forEach(function (attribute) {\n\t return elem.setAttribute(attribute, attributes[attribute]);\n\t });\n\t }\n\t\n\t return elem;\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a DOM element.\n\t *\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n\t */\n\tfunction isElement(value) {\n\t return !!value && isObject(value) && value.nodeType === 1;\n\t}\n\t\n\t/**\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n\t */\n\tfunction isObject(value) {\n\t return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a string.\n\t *\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n\t */\n\tfunction isString(value) {\n\t return value != null && (typeof value === 'string' || isObject(value) && Object.prototype.toString.call(value) === '[object String]');\n\t}\n\t\n\t/**\n\t * Checks if `value` is Array like object.\n\t *\n\t * @param value\n\t * @returns {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n\t */\n\tfunction isArrayLike(value) {\n\t return !!value && typeof value.length === 'number';\n\t}\n\t\n\t/**\n\t * @param {Element} elem\n\t */\n\tfunction emptyElement(elem) {\n\t while (elem.hasChildNodes()) {\n\t elem.removeChild(elem.lastChild);\n\t }\n\t}\n\t\n\t/**\n\t * Empty function\n\t *\n\t * @return void\n\t */\n\tfunction noop() {}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// bundle.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap a9bb1418976bdbc40185","/**\n * Popup overlay for OpenLayers 3 with UMD wrapper.\n * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n *\n * @author Vladimir Vershinin \n * @author Matt Walker (http://longwayaround.org.uk)\n * @author Avi Kelman \n * @licence MIT https://opensource.org/licenses/MIT\n * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org\n * @copyright (c) 2016 Matt Walker, Vladimir Vershinin\n */\nimport Popup from './Popup';\nimport './popup.scss';\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import ol from \"openlayers\";\nimport * as util from \"./util\";\nimport * as easing from \"./easing\";\n\n/**\n * @typedef {Object} PopupOptions\n * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n * A positive value shifts the overlay down. Default is `[0, 0]`.\n * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n * Default is `top-left`.\n * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n * Default is `true`. If the overlay is placed in the same container as that of the controls\n * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n * The default is `true`.\n * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n * This animation is only used when `autoPan` is enabled.\n * Default is `{ duration: 300, easing: easeInOutCubic }`.\n * If set to `null` the panning is not animated.\n * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n */\nvar PopupOptions;\n\n/**\n * @enum {string}\n * @private\n */\nconst PopupEventType = {\n /**\n * Triggered upon popup open.\n * @event Popup#show\n */\n SHOW: \"show\",\n /**\n * Triggered upon popup close.\n * @event Popup#hide\n */\n HIDE: \"hide\"\n};\n\n/**\n * Popup Overlay for OpenLayer 3.\n */\nexport default class Popup extends ol.Overlay {\n /**\n * @param {PopupOptions} [options] Popup options.\n */\n constructor(options = {}) {\n const element = createDOMElement();\n\n options.autoPan = util.coalesce(options.autoPan, true);\n options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n duration: 300,\n easing: easing.easeInOutCubic\n });\n\n super({\n ...options,\n element\n });\n\n /**\n * @type {function}\n * @private\n */\n this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n /**\n * @type {function}\n * @private\n */\n this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n /**\n * @type {Element}\n * @private\n */\n this.content_ = this.getElement().querySelector('.ol-popup-content');\n /**\n * @type {Element}\n * @private\n */\n this.closer_ = this.getElement().querySelector('.ol-popup-closer');\n /**\n * @type {Object}\n * @private\n */\n this.eventListeners_ = {};\n\n enableTouchScroll(this.content_);\n\n if (options.content) {\n this.content = options.content;\n }\n }\n\n //noinspection JSAnnotator\n /**\n * @type {HTMLCollection} Inner content of popup.\n */\n set content(content) {\n this.setContent(content);\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @type {Element} Inner content of popup.\n */\n get content() {\n return this.getContent();\n }\n\n /**\n * @param {Element | HTMLCollection | string} content Update popup inner content.\n */\n setContent(content) {\n util.emptyElement(this.content_);\n\n if (util.isElement(content)) {\n this.content_.appendChild(content);\n } else if (util.isString(content)) {\n this.content_.insertAdjacentHTML('afterBegin', content);\n } else if (util.isArrayLike(content)) {\n util.toArray(content).forEach(elem => this.content_.appendChild(elem));\n }\n }\n\n /**\n * @returns {Element} Inner content of popup.\n */\n getContent() {\n return this.content_;\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @param {ol.Map} map OpenLayers map object.\n */\n setMap(map) {\n super.setMap(map);\n\n if (map) {\n this.bindEvents_();\n this.bringToFront();\n } else {\n this.unbindEvents_();\n }\n }\n\n /**\n * Show on top of other popups.\n */\n bringToFront() {\n const container = this.getElement().parentNode;\n const overlaysContainer = container.parentNode;\n const lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\n if (lastOverlay && lastOverlay !== container) {\n overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n }\n }\n\n /**\n * Shows popup.\n *\n * @param {ol.Coordinate} [coordinate] New popup position.\n * @param {Element | HTMLCollection | string} [content] Replace inner content.\n * @return {Promise} Returns Promise that resolves when showing completes.\n * @fires Popup#show Show event.\n */\n show(coordinate, content) {\n if (content) {\n this.content = content;\n }\n\n const elem = this.getElement();\n elem.style.display = \"block\";\n elem.style.visibility = \"hidden\";\n\n if (coordinate) {\n this.setPosition(coordinate);\n }\n\n return Promise.resolve(this.beforeShow_(this))\n .then(() => {\n elem.style.visibility = \"visible\";\n /**\n * Show event.\n *\n * @event Popup#show\n */\n this.dispatchEvent(PopupEventType.SHOW);\n this.set(\"visible\", true);\n });\n }\n\n /**\n * Hides popup.\n *\n * @return {Promise} Returns Promise that resolves when hiding completes.\n * @fires Popup#hide Hide event.\n */\n hide() {\n this.closer_.blur();\n\n return Promise.resolve(this.beforeHide_(this))\n .then(() => {\n this.getElement().style.display = \"none\";\n /**\n * Hide event.\n *\n * @event Popup#hide\n */\n this.dispatchEvent(PopupEventType.HIDE);\n this.set(\"visible\", false);\n });\n }\n\n /**\n * @private\n */\n bindEvents_() {\n this.listenEvent_('closerclick', this.closer_, 'click', evt => {\n evt.preventDefault();\n this.hide();\n });\n\n const elemListener = ::this.bringToFront;\n [\"click\", \"focus\"].forEach(eventName => this.listenEvent_('elem' + eventName, this.getElement(), eventName, elemListener));\n }\n\n /**\n * @private\n */\n unbindEvents_() {\n Object.keys(this.eventListeners_).forEach(::this.unlistenEvent_);\n }\n\n /**\n * @param {string} name Unique name\n * @param {Element} target\n * @param {string} event\n * @param {function} listener\n * @private\n */\n listenEvent_(name, target, event, listener) {\n if (this.eventListeners_[name]) {\n this.unlistenEvent_(name);\n }\n\n target.addEventListener(event, listener);\n\n this.eventListeners_[name] = {\n target,\n event,\n listener\n };\n }\n\n /**\n * @param {string} name Unique name\n * @private\n */\n unlistenEvent_(name) {\n if (this.eventListeners_[name]) {\n const { target, event, listener } = this.eventListeners_[name];\n\n target.removeEventListener(event, listener);\n }\n }\n}\n\n/**\n * @return {Element}\n * @private\n */\nfunction createDOMElement() {\n const element = util.createElement('div', 'ol-popup');\n const closer = util.createElement('a', 'ol-popup-closer', {\n href: '#'\n });\n\n element.appendChild(closer);\n\n // append content container\n const content = util.createElement('div', 'ol-popup-content');\n element.appendChild(content);\n\n return element;\n}\n\n/**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction isTouchDevice() {\n try {\n document.createEvent(\"TouchEvent\");\n\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction enableTouchScroll(elm) {\n if (isTouchDevice()) {\n let scrollStartPos = 0;\n\n elm.addEventListener(\"touchstart\", function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n\n elm.addEventListener(\"touchmove\", function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Popup.js","/**\n * Easing functions pack\n */\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInQuad(t) {\n return t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutQuad(t) {\n return t * (2 - t);\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutQuad(t) {\n return t < .5 ?\n 2 * t * t :\n -1 + (4 - 2 * t) * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInCubic(t) {\n return t * t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutCubic(t) {\n return (--t) * t * t + 1;\n}\n\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutCubic(t) {\n return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/easing.js","/**\n * @param {*} arg1 Value to check.\n * @param {*} arg2 Value to check.\n * @param {...*} [args] Values to check.\n * @return {*} First argument that is not equal `undefined` or `null`\n */\nexport function coalesce(arg1, arg2, ...args) {\n return [].slice.call(arguments).find(value => value != null);\n}\n\n/**\n * @param {*} value\n * @return {Array}\n */\nexport function toArray(value) {\n return isArrayLike(value) ? [].slice.call(value) : [];\n}\n\n/**\n * @param {string} tagName\n * @param {string|string[]} [classes] CSS classes.\n * @param {Object} [attributes] Element attributes.\n * @returns {Element}\n */\nexport function createElement(tagName, classes, attributes) {\n const elem = document.createElement(tagName);\n\n if (classes) {\n elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n }\n\n if (attributes) {\n Object.keys(attributes).forEach(attribute => elem.setAttribute(attribute, attributes[attribute]));\n }\n\n return elem;\n}\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n */\nexport function isElement(value) {\n return !!value && isObject(value) && value.nodeType === 1;\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n */\nexport function isObject(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * Checks if `value` is likely a string.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n */\nexport function isString(value) {\n return value != null && (\n typeof value === 'string' ||\n isObject(value) && Object.prototype.toString.call(value) === '[object String]'\n );\n}\n\n/**\n * Checks if `value` is Array like object.\n *\n * @param value\n * @returns {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n */\nexport function isArrayLike(value) {\n return !!value && typeof value.length === 'number';\n}\n\n/**\n * @param {Element} elem\n */\nexport function emptyElement(elem) {\n while (elem.hasChildNodes()) {\n elem.removeChild(elem.lastChild);\n }\n}\n\n/**\n * Empty function\n *\n * @return void\n */\nexport function noop() { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/util.js","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}\n// module id = 5\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///bundle.min.js","webpack:///webpack/bootstrap c4a240bd86f18386fcf4","webpack:///./src/index.js","webpack:///./src/Popup.js","webpack:///./src/easing.js","webpack:///./src/util.js","webpack:///external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_5__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","Object","defineProperty","value","_Popup","_Popup2","_interopRequireWildcard","newObj","key","prototype","hasOwnProperty","_classCallCheck","instance","Constructor","TypeError","_possibleConstructorReturn","self","ReferenceError","_inherits","subClass","superClass","create","constructor","enumerable","writable","configurable","setPrototypeOf","__proto__","createDOMElement","element","util","createElement","closer","href","appendChild","content","isTouchDevice","document","createEvent","e","enableTouchScroll","elm","scrollStartPos","addEventListener","event","scrollTop","touches","pageY","_extends","assign","target","i","arguments","length","source","_createClass","defineProperties","props","descriptor","protoProps","staticProps","_get","get","object","property","receiver","Function","desc","getOwnPropertyDescriptor","undefined","parent","getPrototypeOf","getter","_openlayers","_openlayers2","_util","_easing","easing","PopupEventType","SHOW","HIDE","Popup","_ol$Overlay","options","autoPan","coalesce","autoPanAnimation","duration","easeInOutCubic","_this","beforeShow_","beforeShow","noop","beforeHide_","beforeHide","content_","getElement","querySelector","closer_","eventListeners_","_this2","emptyElement","isElement","isString","insertAdjacentHTML","isArrayLike","toArray","forEach","elem","map","bindEvents_","bringToFront","unbindEvents_","container","parentNode","overlaysContainer","lastOverlay","querySelectorAll","pop","insertBefore","nextSibling","coordinate","_this3","style","display","visibility","setPosition","Promise","resolve","then","dispatchEvent","set","_this4","blur","_this5","listenEvent_","evt","preventDefault","hide","elemListener","bind","eventName","keys","unlistenEvent_","name","listener","_eventListeners_$name","removeEventListener","setContent","getContent","Overlay","easeInQuad","t","easeOutQuad","easeInOutQuad","easeInCubic","easeOutCubic","arg1","arg2","_len","args","Array","_key","slice","find","tagName","classes","attributes","classList","add","apply","split","attribute","setAttribute","isObject","nodeType","_typeof","toString","hasChildNodes","removeChild","lastChild","Symbol","iterator"],"mappings":";;;;;;;;;;;CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,eACA,kBAAAC,gBAAAC,IACAD,QAAA,cAAAJ,GACA,gBAAAC,SACAA,QAAA,aAAAD,EAAAG,QAAA,gBAEAJ,EAAA,GAAAA,EAAA,OAA+BA,EAAA,gBAAAC,EAAAD,EAAA,MAC9BO,KAAA,SAAAC,GACD,MCWgB,UAAUC,GCjB1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,SAGAR,EAAA,KD2BM,SAASP,EAAQD,EAASQ,GAE/B,YAYA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,QAASF,GAVvFG,OAAOC,eAAetB,EAAS,cAC7BuB,OAAO,GE5DV,IAAAC,GAAAhB,EAAA,GFiEKiB,EAAUR,EAAuBO,EEhEtChB,GAAA,GFgFCR,EAAQoB,QAAUK,EAAQL,QAC1BnB,EAAOD,QAAUA,EAAiB,SAI7B,SAASC,EAAQD,EAASQ,GAE/B,YAwBA,SAASkB,GAAwBR,GAAO,GAAIA,GAAOA,EAAIC,WAAc,MAAOD,EAAc,IAAIS,KAAa,IAAW,MAAPT,EAAe,IAAK,GAAIU,KAAOV,GAAWG,OAAOQ,UAAUC,eAAejB,KAAKK,EAAKU,KAAMD,EAA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xL,GAAO,aAAcA,IAAS,SAAUA,GAAO,MAAOA,IAAyB,kBAAXuL,SAAyBvL,EAAIwB,cAAgB+J,QAAUvL,IAAQuL,OAAO5K,UAAY,eAAkBX,GAEtQlB,GK1lBeyG,WL2lBfzG,EKnlBe8H,ULolBf9H,EK1kBemD,gBL2kBfnD,EKtjBe0H,YLujBf1H,EK9iBekM,WL+iBflM,EKpiBe2H,WLqiBf3H,EKvhBe6H,cLwhBf7H,EKjhBeyH,eLkhBfzH,EKvgBegH,QLknBV,SAAS/G,EAAQD,KAMjB,SAASC,EAAQD,GMztBvBC,EAAAD,QAAAM","file":"bundle.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"openlayers\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PopupOverlay\"] = factory(require(\"openlayers\"));\n\telse\n\t\troot[\"ol\"] = root[\"ol\"] || {}, root[\"ol\"][\"PopupOverlay\"] = factory(root[\"ol\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","/*!\n * Popup overlay for OpenLayers with UMD wrapper\n * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n * \n * @package ol-popup-umd\n * @author Vladimir Vershinin \n * @author Matt Walker (http://longwayaround.org.uk),@author Avi Kelman \n * @version 1.3.1\n * @licence MIT https://opensource.org/licenses/MIT\n * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin \n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"openlayers\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"openlayers\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"PopupOverlay\"] = factory(require(\"openlayers\"));\n\telse\n\t\troot[\"ol\"] = root[\"ol\"] || {}, root[\"ol\"][\"PopupOverlay\"] = factory(root[\"ol\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_5__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"/dist/\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _Popup = __webpack_require__(1);\n\t\n\tvar _Popup2 = _interopRequireDefault(_Popup);\n\t\n\t__webpack_require__(4);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\t/**\n\t * Popup overlay for OpenLayers 3 with UMD wrapper.\n\t * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n\t *\n\t * @author Vladimir Vershinin \n\t * @author Matt Walker (http://longwayaround.org.uk)\n\t * @author Avi Kelman \n\t * @licence MIT https://opensource.org/licenses/MIT\n\t * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin\n\t */\n\texports.default = _Popup2.default;\n\tmodule.exports = exports['default'];\n\n/***/ },\n/* 1 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if (\"value\" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };\n\t\n\tvar _openlayers = __webpack_require__(5);\n\t\n\tvar _openlayers2 = _interopRequireDefault(_openlayers);\n\t\n\tvar _util = __webpack_require__(3);\n\t\n\tvar util = _interopRequireWildcard(_util);\n\t\n\tvar _easing = __webpack_require__(2);\n\t\n\tvar easing = _interopRequireWildcard(_easing);\n\t\n\tfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\t\n\tfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\t\n\t/**\n\t * @typedef {Object} PopupOptions\n\t * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n\t * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n\t * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n\t * A positive value shifts the overlay down. Default is `[0, 0]`.\n\t * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n\t * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n\t * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n\t * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n\t * Default is `top-left`.\n\t * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n\t * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n\t * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n\t * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n\t * Default is `true`. If the overlay is placed in the same container as that of the controls\n\t * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n\t * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n\t * The default is `true`.\n\t * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n\t * This animation is only used when `autoPan` is enabled.\n\t * Default is `{ duration: 300, easing: easeInOutCubic }`.\n\t * If set to `null` the panning is not animated.\n\t * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n\t * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n\t * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n\t * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n\t */\n\tvar PopupOptions;\n\t\n\t/**\n\t * @enum {string}\n\t * @private\n\t */\n\tvar PopupEventType = {\n\t /**\n\t * Triggered upon popup open.\n\t * @event Popup#show\n\t */\n\t SHOW: \"show\",\n\t /**\n\t * Triggered upon popup close.\n\t * @event Popup#hide\n\t */\n\t HIDE: \"hide\"\n\t};\n\t\n\t/**\n\t * Popup Overlay for OpenLayers.\n\t */\n\t\n\tvar Popup = function (_ol$Overlay) {\n\t _inherits(Popup, _ol$Overlay);\n\t\n\t /**\n\t * @param {PopupOptions} [options] Popup options.\n\t */\n\t function Popup() {\n\t var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t _classCallCheck(this, Popup);\n\t\n\t var element = createDOMElement();\n\t\n\t options.autoPan = util.coalesce(options.autoPan, true);\n\t options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n\t duration: 300,\n\t easing: easing.easeInOutCubic\n\t });\n\t\n\t /**\n\t * @type {function}\n\t * @private\n\t */\n\t var _this = _possibleConstructorReturn(this, (Popup.__proto__ || Object.getPrototypeOf(Popup)).call(this, _extends({}, options, {\n\t element: element\n\t })));\n\t\n\t _this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n\t /**\n\t * @type {function}\n\t * @private\n\t */\n\t _this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n\t /**\n\t * @type {Element}\n\t * @private\n\t */\n\t _this.content_ = _this.getElement().querySelector('.ol-popup-content');\n\t /**\n\t * @type {Element}\n\t * @private\n\t */\n\t _this.closer_ = _this.getElement().querySelector('.ol-popup-closer');\n\t /**\n\t * @type {Object}\n\t * @private\n\t */\n\t _this.eventListeners_ = {};\n\t\n\t enableTouchScroll(_this.content_);\n\t\n\t if (options.content) {\n\t _this.content = options.content;\n\t }\n\t return _this;\n\t }\n\t\n\t //noinspection JSAnnotator\n\t /**\n\t * @type {HTMLCollection} Inner content of popup.\n\t */\n\t\n\t\n\t _createClass(Popup, [{\n\t key: \"setContent\",\n\t\n\t\n\t /**\n\t * @param {Element | HTMLCollection | string} content Update popup inner content.\n\t */\n\t value: function setContent(content) {\n\t var _this2 = this;\n\t\n\t util.emptyElement(this.content_);\n\t\n\t if (util.isElement(content)) {\n\t this.content_.appendChild(content);\n\t } else if (util.isString(content)) {\n\t this.content_.insertAdjacentHTML('afterBegin', content);\n\t } else if (util.isArrayLike(content)) {\n\t util.toArray(content).forEach(function (elem) {\n\t return _this2.content_.appendChild(elem);\n\t });\n\t }\n\t }\n\t\n\t /**\n\t * @returns {Element} Inner content of popup.\n\t */\n\t\n\t }, {\n\t key: \"getContent\",\n\t value: function getContent() {\n\t return this.content_;\n\t }\n\t\n\t //noinspection JSUnusedGlobalSymbols\n\t /**\n\t * @param {ol.Map} map OpenLayers map object.\n\t */\n\t\n\t }, {\n\t key: \"setMap\",\n\t value: function setMap(map) {\n\t _get(Popup.prototype.__proto__ || Object.getPrototypeOf(Popup.prototype), \"setMap\", this).call(this, map);\n\t\n\t if (map) {\n\t this.bindEvents_();\n\t this.bringToFront();\n\t } else {\n\t this.unbindEvents_();\n\t }\n\t }\n\t\n\t /**\n\t * Show on top of other popups.\n\t */\n\t\n\t }, {\n\t key: \"bringToFront\",\n\t value: function bringToFront() {\n\t var container = this.getElement().parentNode;\n\t var overlaysContainer = container.parentNode;\n\t var lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\t\n\t if (lastOverlay && lastOverlay !== container) {\n\t overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n\t }\n\t }\n\t\n\t /**\n\t * Shows popup.\n\t *\n\t * @param {ol.Coordinate} [coordinate] New popup position.\n\t * @param {Element | HTMLCollection | string} [content] Replace inner content.\n\t * @return {Promise} Returns Promise that resolves when showing completes.\n\t * @fires Popup#show Show event.\n\t */\n\t\n\t }, {\n\t key: \"show\",\n\t value: function show(coordinate, content) {\n\t var _this3 = this;\n\t\n\t if (content) {\n\t this.content = content;\n\t }\n\t\n\t var elem = this.getElement();\n\t elem.style.display = \"block\";\n\t elem.style.visibility = \"hidden\";\n\t\n\t if (coordinate) {\n\t this.setPosition(coordinate);\n\t }\n\t\n\t return Promise.resolve(this.beforeShow_(this)).then(function () {\n\t elem.style.visibility = \"visible\";\n\t /**\n\t * Show event.\n\t *\n\t * @event Popup#show\n\t */\n\t _this3.dispatchEvent(PopupEventType.SHOW);\n\t _this3.set(\"visible\", true);\n\t });\n\t }\n\t\n\t /**\n\t * Hides popup.\n\t *\n\t * @return {Promise} Returns Promise that resolves when hiding completes.\n\t * @fires Popup#hide Hide event.\n\t */\n\t\n\t }, {\n\t key: \"hide\",\n\t value: function hide() {\n\t var _this4 = this;\n\t\n\t this.closer_.blur();\n\t\n\t return Promise.resolve(this.beforeHide_(this)).then(function () {\n\t _this4.getElement().style.display = \"none\";\n\t /**\n\t * Hide event.\n\t *\n\t * @event Popup#hide\n\t */\n\t _this4.dispatchEvent(PopupEventType.HIDE);\n\t _this4.set(\"visible\", false);\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"bindEvents_\",\n\t value: function bindEvents_() {\n\t var _this5 = this;\n\t\n\t this.listenEvent_('closerclick', this.closer_, 'click', function (evt) {\n\t evt.preventDefault();\n\t _this5.hide();\n\t });\n\t\n\t var elemListener = this.bringToFront.bind(this);\n\t [\"click\", \"focus\"].forEach(function (eventName) {\n\t return _this5.listenEvent_('elem' + eventName, _this5.getElement(), eventName, elemListener);\n\t });\n\t }\n\t\n\t /**\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"unbindEvents_\",\n\t value: function unbindEvents_() {\n\t Object.keys(this.eventListeners_).forEach(this.unlistenEvent_.bind(this));\n\t }\n\t\n\t /**\n\t * @param {string} name Unique name\n\t * @param {Element} target\n\t * @param {string} event\n\t * @param {function} listener\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"listenEvent_\",\n\t value: function listenEvent_(name, target, event, listener) {\n\t if (this.eventListeners_[name]) {\n\t this.unlistenEvent_(name);\n\t }\n\t\n\t target.addEventListener(event, listener);\n\t\n\t this.eventListeners_[name] = {\n\t target: target,\n\t event: event,\n\t listener: listener\n\t };\n\t }\n\t\n\t /**\n\t * @param {string} name Unique name\n\t * @private\n\t */\n\t\n\t }, {\n\t key: \"unlistenEvent_\",\n\t value: function unlistenEvent_(name) {\n\t if (this.eventListeners_[name]) {\n\t var _eventListeners_$name = this.eventListeners_[name],\n\t target = _eventListeners_$name.target,\n\t event = _eventListeners_$name.event,\n\t listener = _eventListeners_$name.listener;\n\t\n\t\n\t target.removeEventListener(event, listener);\n\t }\n\t }\n\t }, {\n\t key: \"content\",\n\t set: function set(content) {\n\t this.setContent(content);\n\t }\n\t\n\t //noinspection JSUnusedGlobalSymbols\n\t /**\n\t * @type {Element} Inner content of popup.\n\t */\n\t ,\n\t get: function get() {\n\t return this.getContent();\n\t }\n\t }]);\n\t\n\t return Popup;\n\t}(_openlayers2.default.Overlay);\n\t\n\t/**\n\t * @return {Element}\n\t * @private\n\t */\n\t\n\t\n\texports.default = Popup;\n\tfunction createDOMElement() {\n\t var element = util.createElement('div', 'ol-popup');\n\t var closer = util.createElement('a', 'ol-popup-closer', {\n\t href: '#'\n\t });\n\t\n\t element.appendChild(closer);\n\t\n\t // append content container\n\t var content = util.createElement('div', 'ol-popup-content');\n\t element.appendChild(content);\n\t\n\t return element;\n\t}\n\t\n\t/**\n\t * Determine if the current browser supports touch events. Adapted from\n\t * https://gist.github.com/chrismbarr/4107472\n\t * @private\n\t */\n\tfunction isTouchDevice() {\n\t try {\n\t document.createEvent(\"TouchEvent\");\n\t\n\t return true;\n\t } catch (e) {\n\t return false;\n\t }\n\t}\n\t\n\t/**\n\t * Apply workaround to enable scrolling of overflowing content within an\n\t * element. Adapted from https://gist.github.com/chrismbarr/4107472\n\t * @private\n\t */\n\tfunction enableTouchScroll(elm) {\n\t if (isTouchDevice()) {\n\t var scrollStartPos = 0;\n\t\n\t elm.addEventListener(\"touchstart\", function (event) {\n\t scrollStartPos = this.scrollTop + event.touches[0].pageY;\n\t }, false);\n\t\n\t elm.addEventListener(\"touchmove\", function (event) {\n\t this.scrollTop = scrollStartPos - event.touches[0].pageY;\n\t }, false);\n\t }\n\t}\n\tmodule.exports = exports[\"default\"];\n\n/***/ },\n/* 2 */\n/***/ function(module, exports) {\n\n\t\"use strict\";\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\texports.easeInQuad = easeInQuad;\n\texports.easeOutQuad = easeOutQuad;\n\texports.easeInOutQuad = easeInOutQuad;\n\texports.easeInCubic = easeInCubic;\n\texports.easeOutCubic = easeOutCubic;\n\texports.easeInOutCubic = easeInOutCubic;\n\t/**\n\t * Easing functions pack\n\t */\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInQuad(t) {\n\t return t * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeOutQuad(t) {\n\t return t * (2 - t);\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInOutQuad(t) {\n\t return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInCubic(t) {\n\t return t * t * t;\n\t}\n\t\n\t//noinspection JSUnusedGlobalSymbols\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeOutCubic(t) {\n\t return --t * t * t + 1;\n\t}\n\t\n\t/**\n\t * @param t\n\t * @return {number}\n\t */\n\tfunction easeInOutCubic(t) {\n\t return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n\t}\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\texports.coalesce = coalesce;\n\texports.toArray = toArray;\n\texports.createElement = createElement;\n\texports.isElement = isElement;\n\texports.isObject = isObject;\n\texports.isString = isString;\n\texports.isArrayLike = isArrayLike;\n\texports.emptyElement = emptyElement;\n\texports.noop = noop;\n\t/**\n\t * @param {*} arg1 Value to check.\n\t * @param {*} arg2 Value to check.\n\t * @param {...*} [args] Values to check.\n\t * @return {*} First argument that is not equal `undefined` or `null`\n\t */\n\tfunction coalesce(arg1, arg2) {\n\t for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {\n\t args[_key - 2] = arguments[_key];\n\t }\n\t\n\t return [].slice.call(arguments).find(function (value) {\n\t return value != null;\n\t });\n\t}\n\t\n\t/**\n\t * @param {*} value\n\t * @return {Array}\n\t */\n\tfunction toArray(value) {\n\t return isArrayLike(value) ? [].slice.call(value) : [];\n\t}\n\t\n\t/**\n\t * @param {string} tagName\n\t * @param {string|string[]} [classes] CSS classes.\n\t * @param {Object} [attributes] Element attributes.\n\t * @returns {Element}\n\t */\n\tfunction createElement(tagName, classes, attributes) {\n\t var elem = document.createElement(tagName);\n\t\n\t if (classes) {\n\t elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n\t }\n\t\n\t if (attributes) {\n\t Object.keys(attributes).forEach(function (attribute) {\n\t return elem.setAttribute(attribute, attributes[attribute]);\n\t });\n\t }\n\t\n\t return elem;\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a DOM element.\n\t *\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n\t */\n\tfunction isElement(value) {\n\t return !!value && isObject(value) && value.nodeType === 1;\n\t}\n\t\n\t/**\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n\t */\n\tfunction isObject(value) {\n\t return !!value && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object';\n\t}\n\t\n\t/**\n\t * Checks if `value` is likely a string.\n\t *\n\t * @param {*} value\n\t * @return {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n\t */\n\tfunction isString(value) {\n\t return value != null && (typeof value === 'string' || isObject(value) && Object.prototype.toString.call(value) === '[object String]');\n\t}\n\t\n\t/**\n\t * Checks if `value` is Array like object.\n\t *\n\t * @param value\n\t * @returns {boolean}\n\t * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n\t */\n\tfunction isArrayLike(value) {\n\t return !!value && typeof value.length === 'number';\n\t}\n\t\n\t/**\n\t * @param {Element} elem\n\t */\n\tfunction emptyElement(elem) {\n\t while (elem.hasChildNodes()) {\n\t elem.removeChild(elem.lastChild);\n\t }\n\t}\n\t\n\t/**\n\t * Empty function\n\t *\n\t * @return void\n\t */\n\tfunction noop() {}\n\n/***/ },\n/* 4 */\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n/***/ }\n/******/ ])\n});\n;\n\n\n// WEBPACK FOOTER //\n// bundle.min.js"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap c4a240bd86f18386fcf4","/**\n * Popup overlay for OpenLayers 3 with UMD wrapper.\n * Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup\n *\n * @author Vladimir Vershinin \n * @author Matt Walker (http://longwayaround.org.uk)\n * @author Avi Kelman \n * @licence MIT https://opensource.org/licenses/MIT\n * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin\n */\nimport Popup from './Popup';\nimport './popup.scss';\n\nexport default Popup;\n\n\n\n// WEBPACK FOOTER //\n// ./src/index.js","import ol from \"openlayers\";\nimport * as util from \"./util\";\nimport * as easing from \"./easing\";\n\n/**\n * @typedef {Object} PopupOptions\n * @property {number | string | undefined} id Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method.\n * @property {number[] | undefined} offset Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset.\n * A positive value shifts the overlay right. The second element in the array is the vertical offset.\n * A positive value shifts the overlay down. Default is `[0, 0]`.\n * @property {ol.Coordinate | undefined} position The overlay position in map projection.\n * @property {ol.Overlay.Positioning | string | undefined} positioning Defines how the overlay is actually positioned with respect to its position property.\n * Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`,\n * `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`.\n * Default is `top-left`.\n * @property {boolean | undefined} stopEvent Whether event propagation to the map viewport should be stopped. Default is `true`.\n * If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`);\n * if false it is placed in the container with CSS class name `ol-overlaycontainer`.\n * @property {boolean | undefined} insertFirst Whether the overlay is inserted first in the overlay container, or appended.\n * Default is `true`. If the overlay is placed in the same container as that of the controls\n * (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls.\n * @property {boolean | undefined} autoPan If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport.\n * The default is `true`.\n * @property {olx.animation.PanOptions | undefined} autoPanAnimation The options used to create a `ol.animation.pan` animation.\n * This animation is only used when `autoPan` is enabled.\n * Default is `{ duration: 300, easing: easeInOutCubic }`.\n * If set to `null` the panning is not animated.\n * @property {number | undefined} autoPanMargin The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`.\n * @property {Element | HTMLCollection | string | undefined} content Popup initial content.\n * @property {function | undefined} beforeShow Function that called before popup show. Can be used for show animation.\n * @property {function | undefined} beforeHide Function that called before popup hide. Can be used for hide animation.\n */\nvar PopupOptions;\n\n/**\n * @enum {string}\n * @private\n */\nconst PopupEventType = {\n /**\n * Triggered upon popup open.\n * @event Popup#show\n */\n SHOW: \"show\",\n /**\n * Triggered upon popup close.\n * @event Popup#hide\n */\n HIDE: \"hide\"\n};\n\n/**\n * Popup Overlay for OpenLayers.\n */\nexport default class Popup extends ol.Overlay {\n /**\n * @param {PopupOptions} [options] Popup options.\n */\n constructor(options = {}) {\n const element = createDOMElement();\n\n options.autoPan = util.coalesce(options.autoPan, true);\n options.autoPanAnimation = util.coalesce(options.autoPanAnimation, {\n duration: 300,\n easing: easing.easeInOutCubic\n });\n\n super({\n ...options,\n element\n });\n\n /**\n * @type {function}\n * @private\n */\n this.beforeShow_ = util.coalesce(options.beforeShow, util.noop);\n /**\n * @type {function}\n * @private\n */\n this.beforeHide_ = util.coalesce(options.beforeHide, util.noop);\n /**\n * @type {Element}\n * @private\n */\n this.content_ = this.getElement().querySelector('.ol-popup-content');\n /**\n * @type {Element}\n * @private\n */\n this.closer_ = this.getElement().querySelector('.ol-popup-closer');\n /**\n * @type {Object}\n * @private\n */\n this.eventListeners_ = {};\n\n enableTouchScroll(this.content_);\n\n if (options.content) {\n this.content = options.content;\n }\n }\n\n //noinspection JSAnnotator\n /**\n * @type {HTMLCollection} Inner content of popup.\n */\n set content(content) {\n this.setContent(content);\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @type {Element} Inner content of popup.\n */\n get content() {\n return this.getContent();\n }\n\n /**\n * @param {Element | HTMLCollection | string} content Update popup inner content.\n */\n setContent(content) {\n util.emptyElement(this.content_);\n\n if (util.isElement(content)) {\n this.content_.appendChild(content);\n } else if (util.isString(content)) {\n this.content_.insertAdjacentHTML('afterBegin', content);\n } else if (util.isArrayLike(content)) {\n util.toArray(content).forEach(elem => this.content_.appendChild(elem));\n }\n }\n\n /**\n * @returns {Element} Inner content of popup.\n */\n getContent() {\n return this.content_;\n }\n\n //noinspection JSUnusedGlobalSymbols\n /**\n * @param {ol.Map} map OpenLayers map object.\n */\n setMap(map) {\n super.setMap(map);\n\n if (map) {\n this.bindEvents_();\n this.bringToFront();\n } else {\n this.unbindEvents_();\n }\n }\n\n /**\n * Show on top of other popups.\n */\n bringToFront() {\n const container = this.getElement().parentNode;\n const overlaysContainer = container.parentNode;\n const lastOverlay = util.toArray(overlaysContainer.querySelectorAll(\".ol-overlay-container\")).pop();\n\n if (lastOverlay && lastOverlay !== container) {\n overlaysContainer.insertBefore(container, lastOverlay.nextSibling);\n }\n }\n\n /**\n * Shows popup.\n *\n * @param {ol.Coordinate} [coordinate] New popup position.\n * @param {Element | HTMLCollection | string} [content] Replace inner content.\n * @return {Promise} Returns Promise that resolves when showing completes.\n * @fires Popup#show Show event.\n */\n show(coordinate, content) {\n if (content) {\n this.content = content;\n }\n\n const elem = this.getElement();\n elem.style.display = \"block\";\n elem.style.visibility = \"hidden\";\n\n if (coordinate) {\n this.setPosition(coordinate);\n }\n\n return Promise.resolve(this.beforeShow_(this))\n .then(() => {\n elem.style.visibility = \"visible\";\n /**\n * Show event.\n *\n * @event Popup#show\n */\n this.dispatchEvent(PopupEventType.SHOW);\n this.set(\"visible\", true);\n });\n }\n\n /**\n * Hides popup.\n *\n * @return {Promise} Returns Promise that resolves when hiding completes.\n * @fires Popup#hide Hide event.\n */\n hide() {\n this.closer_.blur();\n\n return Promise.resolve(this.beforeHide_(this))\n .then(() => {\n this.getElement().style.display = \"none\";\n /**\n * Hide event.\n *\n * @event Popup#hide\n */\n this.dispatchEvent(PopupEventType.HIDE);\n this.set(\"visible\", false);\n });\n }\n\n /**\n * @private\n */\n bindEvents_() {\n this.listenEvent_('closerclick', this.closer_, 'click', evt => {\n evt.preventDefault();\n this.hide();\n });\n\n const elemListener = ::this.bringToFront;\n [\"click\", \"focus\"].forEach(eventName => this.listenEvent_('elem' + eventName, this.getElement(), eventName, elemListener));\n }\n\n /**\n * @private\n */\n unbindEvents_() {\n Object.keys(this.eventListeners_).forEach(::this.unlistenEvent_);\n }\n\n /**\n * @param {string} name Unique name\n * @param {Element} target\n * @param {string} event\n * @param {function} listener\n * @private\n */\n listenEvent_(name, target, event, listener) {\n if (this.eventListeners_[name]) {\n this.unlistenEvent_(name);\n }\n\n target.addEventListener(event, listener);\n\n this.eventListeners_[name] = {\n target,\n event,\n listener\n };\n }\n\n /**\n * @param {string} name Unique name\n * @private\n */\n unlistenEvent_(name) {\n if (this.eventListeners_[name]) {\n const { target, event, listener } = this.eventListeners_[name];\n\n target.removeEventListener(event, listener);\n }\n }\n}\n\n/**\n * @return {Element}\n * @private\n */\nfunction createDOMElement() {\n const element = util.createElement('div', 'ol-popup');\n const closer = util.createElement('a', 'ol-popup-closer', {\n href: '#'\n });\n\n element.appendChild(closer);\n\n // append content container\n const content = util.createElement('div', 'ol-popup-content');\n element.appendChild(content);\n\n return element;\n}\n\n/**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction isTouchDevice() {\n try {\n document.createEvent(\"TouchEvent\");\n\n return true;\n } catch (e) {\n return false;\n }\n}\n\n/**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @private\n */\nfunction enableTouchScroll(elm) {\n if (isTouchDevice()) {\n let scrollStartPos = 0;\n\n elm.addEventListener(\"touchstart\", function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n\n elm.addEventListener(\"touchmove\", function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/Popup.js","/**\n * Easing functions pack\n */\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInQuad(t) {\n return t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutQuad(t) {\n return t * (2 - t);\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutQuad(t) {\n return t < .5 ?\n 2 * t * t :\n -1 + (4 - 2 * t) * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeInCubic(t) {\n return t * t * t;\n}\n\n//noinspection JSUnusedGlobalSymbols\n/**\n * @param t\n * @return {number}\n */\nexport function easeOutCubic(t) {\n return (--t) * t * t + 1;\n}\n\n/**\n * @param t\n * @return {number}\n */\nexport function easeInOutCubic(t) {\n return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;\n}\n\n\n\n// WEBPACK FOOTER //\n// ./src/easing.js","/**\n * @param {*} arg1 Value to check.\n * @param {*} arg2 Value to check.\n * @param {...*} [args] Values to check.\n * @return {*} First argument that is not equal `undefined` or `null`\n */\nexport function coalesce(arg1, arg2, ...args) {\n return [].slice.call(arguments).find(value => value != null);\n}\n\n/**\n * @param {*} value\n * @return {Array}\n */\nexport function toArray(value) {\n return isArrayLike(value) ? [].slice.call(value) : [];\n}\n\n/**\n * @param {string} tagName\n * @param {string|string[]} [classes] CSS classes.\n * @param {Object} [attributes] Element attributes.\n * @returns {Element}\n */\nexport function createElement(tagName, classes, attributes) {\n const elem = document.createElement(tagName);\n\n if (classes) {\n elem.classList.add.apply(elem.classList, typeof classes === 'string' ? classes.split(' ') : classes);\n }\n\n if (attributes) {\n Object.keys(attributes).forEach(attribute => elem.setAttribute(attribute, attributes[attribute]));\n }\n\n return elem;\n}\n\n/**\n * Checks if `value` is likely a DOM element.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10755\n */\nexport function isElement(value) {\n return !!value && isObject(value) && value.nodeType === 1;\n}\n\n/**\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11055\n */\nexport function isObject(value) {\n return !!value && typeof value === 'object';\n}\n\n/**\n * Checks if `value` is likely a string.\n *\n * @param {*} value\n * @return {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L11457\n */\nexport function isString(value) {\n return value != null && (\n typeof value === 'string' ||\n isObject(value) && Object.prototype.toString.call(value) === '[object String]'\n );\n}\n\n/**\n * Checks if `value` is Array like object.\n *\n * @param value\n * @returns {boolean}\n * @link https://github.com/lodash/lodash/blob/4.13.1/lodash.js#L10638\n */\nexport function isArrayLike(value) {\n return !!value && typeof value.length === 'number';\n}\n\n/**\n * @param {Element} elem\n */\nexport function emptyElement(elem) {\n while (elem.hasChildNodes()) {\n elem.removeChild(elem.lastChild);\n }\n}\n\n/**\n * Empty function\n *\n * @return void\n */\nexport function noop() { }\n\n\n\n// WEBPACK FOOTER //\n// ./src/util.js","module.exports = __WEBPACK_EXTERNAL_MODULE_5__;\n\n\n//////////////////\n// WEBPACK FOOTER\n// external {\"root\":\"ol\",\"amd\":\"openlayers\",\"commonjs\":\"openlayers\",\"commonjs2\":\"openlayers\"}\n// module id = 5\n// module chunks = 0"],"sourceRoot":""} \ No newline at end of file diff --git a/examples/scroll.html b/examples/scroll.html index 21d92ed..df4c181 100644 --- a/examples/scroll.html +++ b/examples/scroll.html @@ -42,7 +42,7 @@ map.on('singleclick', function(evt) { var content = '

If the popup content is quite long then by default it will scroll vertically.

'; - content += '

This behaviour together with the minimum width and maximum height can be changed by overriding the rules for the CSS class .ol-popup-content defined in src/ol3-popup.css.

'; + content += '

This behaviour together with the minimum width and maximum height can be changed by overriding the rules for the CSS class .ol-popup-content defined in src/ol-popup.css.

'; content += '
'; content += '

This text is here to demonstrate the content scrolling due to there being too much content to display :-)

'; popup.show(evt.coordinate, content); diff --git a/ol3-popup-umd.iml b/ol-popup-umd.iml similarity index 62% rename from ol3-popup-umd.iml rename to ol-popup-umd.iml index f1ff38a..cee11ed 100644 --- a/ol3-popup-umd.iml +++ b/ol-popup-umd.iml @@ -11,5 +11,16 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/package.json b/package.json index f4ecaf6..3b8ba2c 100644 --- a/package.json +++ b/package.json @@ -1,38 +1,39 @@ { - "name": "ol3-popup-umd", - "version": "1.3.0", - "description": "Popup overlay for OpenLayers 3 with UMD wrapper", + "name": "ol-popup-umd", + "version": "1.3.1", + "description": "Popup overlay for OpenLayers with UMD wrapper", "main": "dist/bundle.js", "scripts": { "release": "webpack --release --verbose", "build": "webpack --build --verbose", "serv": "webpack-dev-server", + "start": "npm run serv", "docs": "node util/docgen.js", "test": "mocha-phantomjs tests/test.html", "all": "npm run build && npm run release && npm run test && npm run docs" }, "repository": { "type": "git", - "url": "https://github.com/ghettovoice/ol3-popup-umd.git" + "url": "https://github.com/ghettovoice/ol-popup-umd.git" }, - "homepage": "https://github.com/ghettovoice/ol3-popup-umd", - "author": "Vladimir Vershinin (https://github.com/ghettovoice)", + "homepage": "https://github.com/ghettovoice/ol-popup-umd", + "author": "Vladimir Vershinin ", "contributors": [ "Matt Walker (http://longwayaround.org.uk)", "Avi Kelman " ], "license": "MIT", "bugs": { - "url": "https://github.com/ghettovoice/ol3-popup-umd/issues" + "url": "https://github.com/ghettovoice/ol-popup-umd/issues" }, "keywords": [ - "ol3", + "ol", "openlayers", - "ol3-popup-umd" + "ol-popup-umd" ], "dependencies": {}, "peerDependencies": { - "openlayers": ">= 3.14" + "openlayers": ">=3.14" }, "devDependencies": { "autoprefixer": "^6.5.1", @@ -53,7 +54,7 @@ "mocha": "^3.1.2", "mocha-phantomjs": "^4.1.0", "node-sass": "^3.10.1", - "openlayers": "^3.19.1", + "openlayers": "^4.0.1", "postcss-import": "^8.1.2", "postcss-loader": "^1.1.0", "precss": "^1.4.0", diff --git a/src/Popup.js b/src/Popup.js index 274384c..511d256 100644 --- a/src/Popup.js +++ b/src/Popup.js @@ -50,7 +50,7 @@ const PopupEventType = { }; /** - * Popup Overlay for OpenLayer 3. + * Popup Overlay for OpenLayers. */ export default class Popup extends ol.Overlay { /** diff --git a/src/index.js b/src/index.js index e9c0e63..2850216 100644 --- a/src/index.js +++ b/src/index.js @@ -6,8 +6,7 @@ * @author Matt Walker (http://longwayaround.org.uk) * @author Avi Kelman * @licence MIT https://opensource.org/licenses/MIT - * Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org - * @copyright (c) 2016 Matt Walker, Vladimir Vershinin + * @copyright (c) 2016-2017 Matt Walker, Vladimir Vershinin */ import Popup from './Popup'; import './popup.scss'; diff --git a/util/README.md b/util/README.md index 13f98b6..03c6828 100644 --- a/util/README.md +++ b/util/README.md @@ -1,9 +1,12 @@ -[![Build Status](https://travis-ci.org/ghettovoice/ol3-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol3-popup-umd) -[![view on npm](http://img.shields.io/npm/v/ol3-popup-umd.svg)](https://www.npmjs.org/package/ol3-popup-umd) +[![Build Status](https://travis-ci.org/ghettovoice/ol-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol-popup-umd) +[![view on npm](http://img.shields.io/npm/v/ol-popup-umd.svg)](https://www.npmjs.org/package/ol-popup-umd) +[![License](https://img.shields.io/github/license/ghettovoice/ol-popup-umd.svg)](https://github.com/ghettovoice/ol-popup-umd/blob/master/LICENSE) -# ol3-popup-umd +# ol-popup-umd -Basic popup for an OpenLayers 3 map. By default the map is centered so that the popup is entirely visible. +> Popup overlay for OpenLayers with UMD wrapper + +Basic popup for an [OpenLayers](http://openlayers.org) lib. By default the map is centered so that the popup is entirely visible. This project originally forked from [ol3-popup](https://github.com/walkermatt/ol3-popup) by Matt Walker and extended with new features like event emitting, additional methods and others, also packed as UMD package. @@ -12,13 +15,13 @@ and extended with new features like event emitting, additional methods and other Install it thought NPM: ```shell -npm install ol3-popup-umd +npm install ol-popup-umd ``` Or download the latest version archive and add it with script tag: ```html - + ``` ## Usage @@ -26,8 +29,8 @@ Or download the latest version archive and add it with script tag: Plugin is packed into UMD wrapper, import it with CommonJS or ES6: ```js -import PopupOverlay from 'ol3-popup-umd'; -const PopupOverlay = require('ol3-popup-umd'); +import PopupOverlay from 'ol-popup-umd'; +const PopupOverlay = require('ol-popup-umd'); ``` In Browser environment it is available as `ol.PopupOverlay`. diff --git a/webpack.config.js b/webpack.config.js index 3c30617..1a17d10 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -43,8 +43,7 @@ Fork of Matt Walker ol3-popup https://github.com/walkermatt/ol3-popup ${packageJson.contributors.map(author => '@author ' + author)} @version ${packageJson.version} @licence MIT https://opensource.org/licenses/MIT - Based on OpenLayers 3. Copyright 2005-2016 OpenLayers Contributors. All rights reserved. http://openlayers.org -@copyright (c) 2016 Matt Walker, ${packageJson.author}`; +@copyright (c) 2016-${new Date().getFullYear()} Matt Walker, ${packageJson.author}`; const plugins = [ new webpack.optimize.OccurenceOrderPlugin(),