{"analyzedAt":"2022-07-07T06:56:15.239Z","collected":{"metadata":{"name":"ol-popup-umd","scope":"unscoped","version":"1.3.1","description":"Popup overlay for OpenLayers with UMD wrapper","keywords":["ol","openlayers","ol-popup-umd"],"date":"2017-03-20T11:36:29.412Z","author":{"name":"Vladimir Vershinin","email":"ghettovoice@gmail.com","username":"ghettovoice"},"publisher":{"username":"ghettovoice","email":"ghettovoice@gmail.com"},"maintainers":[{"username":"ghettovoice","email":"ghettovoice@gmail.com"}],"contributors":[{"name":"Matt Walker","url":"http://longwayaround.org.uk"},{"name":"Avi Kelman","email":"patcherton.fixesthings@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/ghettovoice/ol-popup-umd.git"},"links":{"npm":"https://www.npmjs.com/package/ol-popup-umd","homepage":"https://github.com/ghettovoice/ol-popup-umd","repository":"https://github.com/ghettovoice/ol-popup-umd","bugs":"https://github.com/ghettovoice/ol-popup-umd/issues"},"license":"MIT","devDependencies":{"autoprefixer":"^6.5.1","babel-loader":"^6.2.7","babel-plugin-add-module-exports":"^0.2.1","babel-plugin-transform-flow-strip-types":"^6.18.0","babel-preset-es2015":"^6.18.0","babel-preset-stage-0":"^6.16.0","chai":"^3.5.0","chalk":"^1.1.3","css-loader":"^0.25.0","es6-promise":"^4.0.5","esdoc":"^0.4.8","esdoc-es7-plugin":"0.0.3","extract-text-webpack-plugin":"^1.0.1","glob":"^7.1.1","lodash":"^4.16.4","mocha":"^3.1.2","mocha-phantomjs":"^4.1.0","node-sass":"^3.10.1","openlayers":"^4.0.1","postcss-import":"^8.1.2","postcss-loader":"^1.1.0","precss":"^1.4.0","progress-bar-webpack-plugin":"^1.9.0","sass-loader":"^4.0.2","style-loader":"^0.13.1","taffydb":"^2.7.3","velocity-animate":"^1.3.1","webpack":"^1.13.3","webpack-dev-server":"^1.16.2","webpack-notifier":"^1.4.1"},"peerDependencies":{"openlayers":">=3.14"},"releases":[{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1},{"from":"2020-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":1}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"[![Build Status](https://travis-ci.org/ghettovoice/ol-popup-umd.svg?branch=master)](https://travis-ci.org/ghettovoice/ol-popup-umd)\n[![view on npm](http://img.shields.io/npm/v/ol-popup-umd.svg)](https://www.npmjs.org/package/ol-popup-umd)\n[![License](https://img.shields.io/github/license/ghettovoice/ol-popup-umd.svg)](https://github.com/ghettovoice/ol-popup-umd/blob/master/LICENSE)\n\n# ol-popup-umd\n\n> Popup overlay for OpenLayers with UMD wrapper\n\nBasic popup for an [OpenLayers](http://openlayers.org) lib. By default the map is centered so that the popup is entirely visible.\nThis project originally forked from [ol3-popup](https://github.com/walkermatt/ol3-popup) by Matt Walker\nand extended with new features like event emitting, additional methods and others, also packed as UMD package. \n\n## Installation\n\nInstall it thought NPM:\n\n```shell\nnpm install ol-popup-umd\n```\n\nOr download the latest version archive and add it with script tag:\n\n```html\n<script src=\"ol-popup-umd/dist/bundle.min.js\"></script>\n```\n\n## Usage\n\nPlugin is packed into UMD wrapper, import it with CommonJS or ES6:\n\n```js\nimport PopupOverlay from 'ol-popup-umd';\nconst PopupOverlay = require('ol-popup-umd');\n```\n\nIn Browser environment it is available as `ol.PopupOverlay`.\n\n## Demo\n\nClone or download the repository and open html files from `examples` directory in a browser.\nClick on the map to display a popup, click close to the edge of the map to see it pan into view.\n\n## API Reference\n\n#### Typedef\n\n \n###PopupOptions : *Object*\n\n**Properties**\n\n| Name  | Type  | Description  | \n|:------|:------|:-------------| \n| **id** | *number  &#124;  string  &#124;  undefined* | Set the overlay id. The overlay id can be used with the `ol.Map#getOverlayById` method. |\n| **offset** | *number[]  &#124;  undefined* | Offsets in pixels used when positioning the overlay. The first element in the array is the horizontal offset. A positive value shifts the overlay right. The second element in the array is the vertical offset. A positive value shifts the overlay down. Default is `[0, 0]`. |\n| **position** | *ol.Coordinate  &#124;  undefined* | The overlay position in map projection. |\n| **positioning** | *ol.Overlay.Positioning  &#124;  string  &#124;  undefined* | Defines how the overlay is actually positioned with respect to its position property. Possible values are `bottom-left`, `bottom-center`, `bottom-right`, `center-left`, `center-center`, `center-right`, `top-left`, `top-center`, and `top-right`. Default is `top-left`. |\n| **stopEvent** | *boolean  &#124;  undefined* | Whether event propagation to the map viewport should be stopped. Default is `true`. If true the overlay is placed in the same container as that of the controls (CSS class name `ol-overlaycontainer-stopevent`); if false it is placed in the container with CSS class name `ol-overlaycontainer`. |\n| **insertFirst** | *boolean  &#124;  undefined* | Whether the overlay is inserted first in the overlay container, or appended. Default is `true`. If the overlay is placed in the same container as that of the controls (see the `stopEvent` option) you will probably set `insertFirst` to true so the overlay is displayed below the controls. |\n| **autoPan** | *boolean  &#124;  undefined* | If set to `true` the map is panned when calling `setPosition`, so that the overlay is entirely visible in the current viewport. The default is `true`. |\n| **autoPanAnimation** | *olx.animation.PanOptions  &#124;  undefined* | The options used to create a `ol.animation.pan` animation. This animation is only used when `autoPan` is enabled. Default is `{ duration: 300, easing: easeInOutCubic }`. If set to `null` the panning is not animated. |\n| **autoPanMargin** | *number  &#124;  undefined* | The margin (in pixels) between the overlay and the borders of the map when autopanning. The default is `20`. |\n| **content** | *Element  &#124;  HTMLCollection  &#124;  string  &#124;  undefined* | Popup initial content. |\n| **beforeShow** | *function  &#124;  undefined* | Function that called before popup show. Can be used for show animation. |\n| **beforeHide** | *function  &#124;  undefined* | Function that called before popup hide. Can be used for hide animation. |\n\n\n\n\n#### Classes\n\n \n\n### Popup(options : *PopupOptions*)\n**Extends:**\n\n- openlayers~ol.Overlay\n\n\n**Params:**\n\n| Name  | Type  | Description  | \n|:------|:------|:-------------|\n| **options** | *PopupOptions* | Popup options. |\n\n\n#### Members\n\nset **content** : *HTMLCollection*\n\nget **content** : *Element*\n\n\n#### Methods\n\n\n**setContent**(content : *Element  &#124;  HTMLCollection  &#124;  string*) \n\n\n\n\n**Params:**\n\n| Name  | Type  | Description  | \n|:------|:------|:-------------|\n| **content** | *Element  &#124;  HTMLCollection  &#124;  string* | Update popup inner content. |\n\n\n\n\n\n\n\n--------- \n\n\n**getContent**() : *Element* \n\n\n\n\n\n**Returns:**\n\nElement - Inner content of popup.\n\n\n\n--------- \n\n\n**setMap**(map : *ol.Map*) \n\n\n\n\n**Params:**\n\n| Name  | Type  | Description  | \n|:------|:------|:-------------|\n| **map** | *ol.Map* | OpenLayers map object. |\n\n\n\n\n\n\n\n--------- \n\n\n**bringToFront**() \nShow on top of other popups.\n\n\n\n\n\n\n--------- \n\n\n**show**(coordinate : *ol.Coordinate*,content : *Element  &#124;  HTMLCollection  &#124;  string*) : *Promise* \nShows popup.\n\n\n\n**Params:**\n\n| Name  | Type  | Description  | \n|:------|:------|:-------------|\n| **coordinate** | *ol.Coordinate* | New popup position. |\n| **content** | *Element  &#124;  HTMLCollection  &#124;  string* | Replace inner content. |\n\n\n\n\n\n**Returns:**\n\nPromise - Returns Promise that resolves when showing completes.\n\n\n\n**Events:**\n\n- Popup#show Show event.\n\n\n--------- \n\n\n**hide**() : *Promise* \nHides popup.\n\n\n\n\n**Returns:**\n\nPromise - Returns Promise that resolves when hiding completes.\n\n\n\n**Events:**\n\n- Popup#hide Hide event.\n\n\n--------- \n\n\n\n\n## Credit\n\nBased on [ol3-popup](https://github.com/walkermatt/ol3-popup) by Matt Walker and\nan example by [Tim Schaub](https://github.com/tschaub) posted on the [OL3-Dev list](https://groups.google.com/forum/#!forum/ol3-dev).\n\n## License\n\nMIT 2016 (c) Matt Walker, Vladimir Vershinin"},"npm":{"downloads":[{"from":"2022-07-06T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-06-30T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":2},{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":9},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":45},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":76},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":145}],"starsCount":0},"github":{"forkOf":"walkermatt/ol-popup","starsCount":2,"forksCount":0,"subscribersCount":1,"issues":{"count":4,"openCount":0,"distribution":{"3600":2,"10800":0,"32400":0,"97200":0,"291600":1,"874800":1,"2624400":0,"7873200":0,"23619600":0,"70858800":0,"212576400":0},"isDisabled":false},"contributors":[{"username":"jonataswalker","commitsCount":1},{"username":"ghettovoice","commitsCount":23},{"username":"walkermatt","commitsCount":19},{"username":"fiendish","commitsCount":1}],"commits":[{"from":"2022-06-30T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":0}],"statuses":[{"context":"continuous-integration/travis-ci/push","state":"success"}]},"source":{"files":{"readmeSize":6125,"testsSize":5479},"badges":[{"urls":{"original":"https://travis-ci.org/ghettovoice/ol-popup-umd.svg?branch=master","service":"https://api.travis-ci.org/ghettovoice/ol-popup-umd.svg?branch=master","shields":"https://img.shields.io/travis/ghettovoice/ol-popup-umd/master.svg","content":"https://img.shields.io/travis/ghettovoice/ol-popup-umd/master.json"},"info":{"service":"travis","type":"build","modifiers":{"branch":"master"}}},{"urls":{"original":"http://img.shields.io/npm/v/ol-popup-umd.svg","shields":"https://img.shields.io/npm/v/ol-popup-umd.svg","content":"https://img.shields.io/npm/v/ol-popup-umd.json"},"info":{"service":"npm","type":"version","modifiers":{"type":"v"}}}],"linters":["editorconfig"]}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.85,"health":1,"branding":0.3},"popularity":{"communityInterest":7,"downloadsCount":15,"downloadsAcceleration":-0.018074581430745806,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":1}},"score":{"final":0.6522421835792169,"detail":{"quality":0.9659558362717634,"popularity":0.035642513124071885,"maintenance":0.9999444374407507}}}