{"name":"viewport-mercator-project","version":"5.1.0-alpha.1","description":"Utilities for perspective-enabled Web Mercator projections","author":{"name":"Uber Technologies, Inc."},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/uber-common/viewport-mercator-project.git"},"homepage":"https://github.com/uber-common/viewport-mercator-project#readme","main":"dist/index.js","module":"dist-es6/index.js","files":["src","dist","dist-es6"],"scripts":{"start":"npm run test","build":"npm run clean && npm run build-es5 && npm run build-es6","build-es5":"mkdir -p dist && babel src --out-dir dist --plugins=transform-es2015-modules-commonjs --source-maps inline","build-es6":"mkdir -p dist-es6 && babel src --out-dir dist-es6 --source-maps inline","clean":"rm -fr dist/* dist-es6/*","lint":"eslint src test","precommit":"npm test","publish-prod":"npm run build && npm run test && npm publish","publish-beta":"npm run build && npm run test && npm publish --tag beta","test":"npm run lint && npm run build && npm run test-node","test-fast":"npm run test-node","test-node":"node test/node.js","test-browser":"webpack-dev-server --env.browser --progress --hot --open"},"dependencies":{"math.gl":">=1.1.0-alpha.1"},"devDependencies":{"@turf/destination":"^5.0.4","babel-cli":"^6.22.2","babel-core":"^6.22.1","babel-eslint":"^6.0.0","babel-plugin-transform-es2015-modules-commonjs":"^6.24.0","babel-preset-es2015":"^6.18","eslint":"^3.0.0","eslint-config-uber-es2015":"^3.0.0","faucet":"0.0.1","gl":"^4.0.3","jsdom":"~9.9.1","mapbox-gl":"0.41.0","mock-browser":"^0.92.14","module-alias":"^2.0.0","pre-commit":"^1.2.2","reify":"^0.5.4","round-precision":"^1.0.0","sinon":"^1.17.7","tap-browser-color":"^0.1.2","tape":"^4.6.0","tape-catch":"^1.0.4","webpack":"^2.2.1","webpack-dev-server":"^2.4.2"},"readme":"<p align=\"right\">\n  <a href=\"https://npmjs.org/package/viewport-mercator-project\">\n    <img src=\"https://img.shields.io/npm/v/viewport-mercator-project.svg?style=flat-square\" alt=\"version\" />\n  </a>\n  <a href=\"https://travis-ci.org/uber/viewport-mercator-project\">\n    <img src=\"https://img.shields.io/travis/uber/viewport-mercator-project/master.svg?style=flat-square\" alt=\"build\" />\n  </a>\n  <a href=\"https://npmjs.org/package/viewport-mercator-project\">\n    <img src=\"https://img.shields.io/npm/dm/viewport-mercator-project.svg?style=flat-square\" alt=\"downloads\" />\n  </a>\n  <a href=\"http://starveller.sigsev.io/uber/viewport-mercator-project\">\n    <img src=\"http://starveller.sigsev.io/api/repos/uber/viewport-mercator-project/badge\" alt=\"stars\" />\n  </a>\n</p>\n\n# viewport-mercator-project | [Docs](https://uber-common.github.io/viewport-mercator-project/#/)\n\nProjection and camera utilities supporting the Web Mercator Projection. At its core this is a utility for converting to and from map coordinates (i.e. latitude, longitude) to screen coordinates and back.\n\n## Installation\n\n```bash\nnpm install viewport-mercator-project --save\n```\n\n## Overview\n\nThe `WebMercatorViewport` class offers the equivalent of a 3D matrix \"camera\" class of the type you would find in any 3D/WebGL/OpenGL library.\n\n```js\nimport WebMercatorViewport from 'viewport-mercator-project';\n\n// A viewport looking at San Francisco city area\nconst viewport = WebMercatorViewport({\n  width: 800,\n  height: 600,\n  longitude: -122.45,\n  latitude: 37.78,\n  zoom: 12,\n  pitch: 60,\n  bearing: 30\n});\n\nviewport.project([-122.45, 37.78]);\n// returns pixel coordinates [400, 300]\nviewport.unproject([400, 300]);\n// returns map coordinates [-122.45, 37.78]\n```\n\n## Who is this for?\n\nSpecifically built for use with [deck.gl](https://github.com/uber/deck.gl) and [react-map-gl](https://github.com/uber/react-map-gl), but could be useful for any web mapping application that wants to support perspective enabled Web Mercator Projections with floating point zoom levels.\n","readmeFilename":"README.md","gitHead":"3aefb68c50858f75ee8627195620b007da77298f","bugs":{"url":"https://github.com/uber-common/viewport-mercator-project/issues"},"_id":"viewport-mercator-project@5.1.0-alpha.1","_npmVersion":"5.6.0","_nodeVersion":"9.7.1","_npmUser":{"name":"ibgreen","email":"ib.green.home@gmail.com"},"dist":{"integrity":"sha512-mI8uoX8NbuTZrhP6teGy2Nl4y7TPGC7tzAe3+jpi3SKFB8TZSX1seD5nKVikVtCm0H79asGhLLVGLsXOgKAUlA==","shasum":"c5a7b4e53b48fc5ba8f6949359605bd0f4f362bc","tarball":"http://registry-npm.ywwl.com/viewport-mercator-project/download/viewport-mercator-project-5.1.0-alpha.1.tgz","fileCount":28,"unpackedSize":273263,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIG/EankxHPWFIwyc7wwwEtpwXSXr5tS5ujxlwwuUcUgOAiBPXYkxjqfV9GZgWszFtvmQ6E1ClPLkxKAxSCCQXMcySg=="}],"size":91972,"noattachment":false,"key":"/viewport-mercator-project/-/viewport-mercator-project-5.1.0-alpha.1.tgz"},"maintainers":[{"name":"gnavvy","email":"gnavvy@gmail.com"},{"name":"ibgreen","email":"ib.green.home@gmail.com"},{"name":"pessimistress","email":"cxiaoji@gmail.com"},{"name":"vicapow","email":"vicapow@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/viewport-mercator-project_5.1.0-alpha.1_1521679824210_0.20039266331131622"},"_hasShrinkwrap":false,"deprecated":"Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.","publish_time":1521679824274,"_cnpm_publish_time":1521679824274,"dist-tags":{"beta":"7.0.0-alpha.1","latest":"7.0.4"}}