{"analyzedAt":"2022-07-07T06:56:20.976Z","collected":{"metadata":{"name":"ol-mapscale","scope":"unscoped","version":"3.0.0","description":"Map scale control with scale string for OpenLayers","keywords":["ol","openlayers","ol-mapscale"],"date":"2019-07-09T08:27:15.311Z","author":{"name":"Vladimir Vershinin","email":"ghettovoice@gmail.com","username":"ghettovoice"},"publisher":{"username":"ghettovoice","email":"ghettovoice@gmail.com"},"maintainers":[{"username":"ghettovoice","email":"ghettovoice@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/ghettovoice/ol-mapscale.git"},"links":{"npm":"https://www.npmjs.com/package/ol-mapscale","homepage":"https://github.com/ghettovoice/ol-mapscale","repository":"https://github.com/ghettovoice/ol-mapscale","bugs":"https://github.com/ghettovoice/ol-mapscale/issues"},"license":"MIT","devDependencies":{"autoprefixer":"^7.2.5","babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-plugin-external-helpers":"^6.22.0","babel-plugin-istanbul":"^4.1.5","babel-preset-env":"^1.6.1","babel-preset-stage-0":"^6.24.1","chai":"^4.1.2","chalk":"^2.3.0","coveralls":"^3.0.0","cross-env":"^5.1.3","css-loader":"^0.28.9","cssnano":"^3.10.0","fs-extra":"^5.0.0","glob":"^7.1.2","html-webpack-plugin":"^2.30.1","karma":"^2.0.0","karma-chai":"^0.1.0","karma-coverage":"^1.1.1","karma-mocha":"^1.3.0","karma-phantomjs-launcher":"^1.0.4","karma-sinon":"^1.0.5","karma-sinon-chai":"^1.3.3","karma-sourcemap-loader":"^0.3.7","karma-spec-reporter":"0.0.32","karma-webpack":"^2.0.9","mocha":"^5.0.0","mocha-phantomjs":"^4.1.0","node-sass":"^4.11.0","ol":"^5.3.3","openlayers":"^4.6.4","phantomjs-prebuilt":"^2.1.16","postcss":"^6.0.17","postcss-import":"^11.0.0","postcss-load-config":"^1.2.0","postcss-loader":"^2.1.0","rollup":"^0.55.3","rollup-plugin-babel":"^3.0.3","rollup-plugin-commonjs":"^8.3.0","rollup-plugin-node-resolve":"^3.0.2","rollup-plugin-replace":"^2.0.0","rollup-plugin-sass":"^0.5.3","rollup-plugin-uglify":"^3.0.0","sass-loader":"^6.0.6","sinon":"^4.2.2","sinon-chai":"^2.14.0","source-map-concat":"^1.0.1","style-loader":"^0.20.1","webpack":"^3.10.0","webpack-dev-server":"^2.11.1","webpack-merge":"^4.1.1"},"peerDependencies":{"ol":">=5.0"},"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-mapscale.svg?branch=master)](https://travis-ci.org/ghettovoice/ol-mapscale)\n[![Coverage Status](https://coveralls.io/repos/github/ghettovoice/ol-mapscale/badge.svg?branch=master)](https://coveralls.io/github/ghettovoice/ol-mapscale?branch=master)\n[![view on npm](http://img.shields.io/npm/v/ol-mapscale.svg)](https://www.npmjs.org/package/ol-mapscale)\n[![GitHub tag](https://img.shields.io/github/tag/ghettovoice/ol-mapscale.svg)](https://github.com/ghettovoice/ol-mapscale/releases)\n[![License](https://img.shields.io/github/license/ghettovoice/ol-mapscale.svg)](https://github.com/ghettovoice/ol-mapscale/blob/master/LICENSE)\n\n# Map scale control with scale string for OpenLayers\n\nAdds custom control to [OpenLayers](https://openlayers.org/) map. Shows scale line and scale string.\n\n## Installation\n\nInstall it thought NPM or Bower:\n\n```shell\n# ES6 version for bundling with Webpack, Rollup or etc.\nnpm install ol ol-mapscale\n# to use UMD version 'openlayers' package should be installed\nnpm install openlayers\n```\n\nOr add from CDN:\n\n```html\n<script src=\"https://unpkg.com/openlayers@latest/dist/ol.js\"></script>\n<script src=\"https://unpkg.com/ol-mapscale@latest/dist/bundle.min.js\"></script>\n```\n\n### Note\n**Plugin is available in 2 versions: as UMD module and as ES2015 module:**\n- **RECOMMENDED: ES2015 version (`dist/bundle.es.js`) should be used with [ol](https://www.npmjs.com/package/ol) package (you should\n  install it manually).**\n- **UMD version (`dist/bundle[.min].js`) should be used with [openlayers](https://www.npmjs.com/package/openlayers) package.\n  You can install `ol` package as dev dependency to suppress NPM warning about required peer dependencies.**\n\n## Usage\n\nPlugin may be used as UMD module or ES2015 module:\n\n```js\n// Use as ES2015 module (based on NPM package `ol`)\nimport Map from 'ol/map'\n...\nimport MapScaleControl from 'ol-mapscale'\n\n// Use as UMD module (based on NPM package `openlayers`)\nconst ol = require('openlayers')\n...\nconst MapScaleControl = require('ol-mapscale')\n```\n\nIn Browser environment you should add **script** tag pointing to UMD module after OpenLayers js files.\n```html\n<script src=\"https://unpkg.com/openlayers@latest/dist/ol.js\"></script>\n<script src=\"https://unpkg.com/ol-mapscale@latest/dist/bundle.min.js\"></script>\n<script>\n  // plugin exports global variable MapScaleControl\n  // in addition it also exported to `ol.control.MapScale` field (for backward compatibility).\n</script>\n```\n\n### Options\n\n| Option              | Type                                      | Description                                                                            |\n|:--------------------|:------------------------------------------|:---------------------------------------------------------------------------------------|\n| target              | _Element &#124; string &#124; undefined_  | Specify a target if you want the control to be rendered outside of the map's viewport. |\n| className           | _string &#124; string[] &#124; undefined_ | Custom class name of the control container element. Default is `ol-mapscale`.          |\n| scaleLineClassName  | _string &#124; string[] &#124; undefined_ | Custom class name of the scale line container element. Default is `ol-scale-line`.     |\n| scaleValueClassName | _string &#124; string[] &#124; undefined_ | Custom class name of the scale value container element. Default is `ol-scale-value`.   |\n| scaleLine           | _boolean &#124; undefined_                | Show/hide scale line control. Default is `true`.                                       |\n| units               | _string[] &#124; undefined_               | Array of scale value units. Default is `['k', 'M', 'G']`.                              |\n| digits              | _number &#124; undefined_                 | The number of digits to appear after the decimal point. Default is `0`.                |\n\n### Example usage:\n```js\nimport Map from 'ol/map'\nimport View from 'ol/view'\nimport TileLayer from 'ol/layer/tile'\nimport OSMSource from 'ol/source/osm'\nimport 'ol/ol.css'\nimport MapScaleControl from 'ol-mapscale'\n\nconst map = new Map({\n  target: 'map',\n  view: new View({\n    center: [4189972.14, 7507950.67],\n    zoom: 5,\n  }),\n  layers: [\n    new TileLayer({\n      source: new OSMSource(),\n    }),\n  ],\n})\n\nmap.addControl(new MapScaleControl())\n```\n\n## License\n\nMIT (c) 2016-2018, 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":8},{"from":"2022-06-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":26},{"from":"2022-04-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":85},{"from":"2022-01-08T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":149},{"from":"2021-07-07T00:00:00.000Z","to":"2022-07-07T00:00:00.000Z","count":306}],"starsCount":0},"github":{"starsCount":12,"forksCount":2,"subscribersCount":1,"issues":{"count":6,"openCount":0,"distribution":{"3600":0,"10800":0,"32400":0,"97200":2,"291600":0,"874800":0,"2624400":1,"7873200":1,"23619600":1,"70858800":1,"212576400":0},"isDisabled":false},"contributors":[{"username":"rpFilipe","commitsCount":1},{"username":"ghettovoice","commitsCount":35}],"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":"coverage/coveralls","state":"success"},{"context":"continuous-integration/travis-ci/push","state":"success"}]},"source":{"files":{"readmeSize":4433,"testsSize":4893},"badges":[{"urls":{"original":"https://travis-ci.org/ghettovoice/ol-mapscale.svg?branch=master","service":"https://api.travis-ci.org/ghettovoice/ol-mapscale.svg?branch=master","shields":"https://img.shields.io/travis/ghettovoice/ol-mapscale/master.svg","content":"https://img.shields.io/travis/ghettovoice/ol-mapscale/master.json"},"info":{"service":"travis","type":"build","modifiers":{"branch":"master"}}},{"urls":{"original":"https://coveralls.io/repos/github/ghettovoice/ol-mapscale/badge.svg?branch=master","service":"https://coveralls.io/repos/github/ghettovoice/ol-mapscale/badge.svg?branch=master","shields":"https://img.shields.io/coveralls/ghettovoice/ol-mapscale/master.svg","content":"https://img.shields.io/coveralls/ghettovoice/ol-mapscale/master.json"},"info":{"service":"coveralls","type":"coverage","modifiers":{"branch":"master"}}},{"urls":{"original":"http://img.shields.io/npm/v/ol-mapscale.svg","shields":"https://img.shields.io/npm/v/ol-mapscale.svg","content":"https://img.shields.io/npm/v/ol-mapscale.json"},"info":{"service":"npm","type":"version","modifiers":{"type":"v"}}}],"linters":["editorconfig"],"coverage":0.77}},"evaluation":{"quality":{"carefulness":0.9199999999999999,"tests":0.9655,"health":1,"branding":0.44999999999999996},"popularity":{"communityInterest":17,"downloadsCount":28.333333333333332,"downloadsAcceleration":0.004433028919330284,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.6623661602925563,"detail":{"quality":0.9840019274603476,"popularity":0.04913813684806228,"maintenance":0.9999063833075152}}}