{"_id":"@amoo-miki/leaflet-vega","_rev":"1-780865a8a04c3f4ad964e77ae89a42e3","name":"@amoo-miki/leaflet-vega","dist-tags":{"latest":"0.8.8"},"versions":{"0.8.7":{"name":"@amoo-miki/leaflet-vega","version":"0.8.7","description":"Vega layer for Leaflet","homepage":"https://github.com/AMoo-Miki/leaflet-vega","author":{"name":"Yuri Astrakhan","email":"YuriAstrakhan@gmail.com"},"contributors":[{"name":"Nathan Reese","email":"reese.nathan@gmail.com"},{"name":"AMoo-Miki"}],"keywords":["vega","leaflet"],"main":"dist/bundle.js","module":"src/VegaLayer.js","jspm":{"registry":"npm","format":"es6","main":"src/VegaLayer.js"},"repository":{"type":"git","url":"git+https://github.com/AMoo-Miki/leaflet-vega.git"},"license":"BSD-2-Clause","dependencies":{"vega-spec-injector":"^0.0.2"},"devDependencies":{"@babel/core":"^7.19.0","@babel/plugin-external-helpers":"^7.18.6","@babel/plugin-transform-async-to-generator":"^7.18.6","@babel/preset-env":"^7.19.0","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^14.0.1","eslint":"^8.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-kartotherian":"^0.0.2","eslint-config-mourner":"^3.0.0","rollup":"^2.79.0"},"scripts":{"test":"eslint src","precommit":"npm run test","build":"rollup -c rollup.config.js","prepare":"npm run test && npm run build","dev":"rollup -c rollup.config.js -w"},"gitHead":"fab0eb0ff5f48d63b5b64c40f82b52dd62ae073a","bugs":{"url":"https://github.com/AMoo-Miki/leaflet-vega/issues"},"_id":"@amoo-miki/leaflet-vega@0.8.7","_nodeVersion":"14.20.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-T4M5yziwj3Fi9Adsbce+cdWqPjON0BRwEjwqLlPMoirU1vhifA6YKrlZkVzJrK0IIm+hdfMCLkBz33gD8fdxzQ==","shasum":"8faca1b4b8e2ef7d48667ac6faad9204f4da7153","tarball":"https://registry.npmjs.org/@amoo-miki/leaflet-vega/-/leaflet-vega-0.8.7.tgz","fileCount":11,"unpackedSize":83461,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIG6BITBC0EiZwqhu9cfv/s2UUmXDxtKH1gu6Ds9CIyG8AiEA0NN8RfTGvJ+EMwGpCq/fAqJVvccbs9cVVQcdkz5LN4k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHRe8ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmovnRAAnXfc65aDVuAIP78SJZwwT0v4eo8S0Y8ejqkiBfZMZ568cQFR\r\n2fDv3hvSTzPEEwHW+1TAZXntuzVSdLruXXKAJZZVKL+MZeNtxqEdD2kMWyPu\r\ne/fR5+qv10Gu3Kcr3a4dZnFEUXKtl8q+f2RySlQfbzUnJZYCMfVmuZnpM9Am\r\n/JgjNo0+v02hNHWBK2tDp7ijvMevzZWoRRRGR5gS7/kMtL0QqXumYSM9AzoU\r\nj++tg057XTDey5FKEa1AKEt2Pzh2t03N54DZMihKg068/MZkzE45go6gg+Yg\r\nH8g24v0yfCOMLQ7zy+GIB//jTufTlcwXmoxk398znL7DbTW4erYVoK9+Xwkg\r\nkaj+ojPPzVnoW3D4h+NEvTPbRrpafbzTQJ/T5aeCTDjJl9/MgHpsf9aeGjVK\r\ntllCFLAXlVzOgEKQ/evlIbnS32AToUnu+CQIOSH5HuIWq51KDXb/28fmYdek\r\nnUfQDXOBk2CJq58gBXVJFJLObXj6Ae7HCuS+vfW8flLrhnFp2c9f3m10G1Ee\r\noFd3ozbnmrp8Okw6Yaks7oEfEiZjugMxyilObDw2l5zTrUWwLXsrVFsbDrxT\r\n//lhyKxGUJxAoDQp1/TTkCzPsQ7hYegWDsyC6KefQ93DoWs6KBwJuH2KiMhG\r\njrFmE/JDxis/q70LLhBTEYDSuxktZNzmKEo=\r\n=0/hu\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"amoo_miki","email":"amoo_miki@yahoo.com"},"directories":{},"maintainers":[{"name":"amoo_miki","email":"amoo_miki@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-vega_0.8.7_1662851003977_0.24826707471581733"},"_hasShrinkwrap":false},"0.8.8":{"name":"@amoo-miki/leaflet-vega","version":"0.8.8","description":"Vega layer for Leaflet","homepage":"https://github.com/AMoo-Miki/leaflet-vega","author":{"name":"Yuri Astrakhan","email":"YuriAstrakhan@gmail.com"},"contributors":[{"name":"Nathan Reese","email":"reese.nathan@gmail.com"},{"name":"AMoo-Miki"}],"keywords":["vega","leaflet"],"main":"dist/bundle.js","module":"src/VegaLayer.js","jspm":{"registry":"npm","format":"es6","main":"src/VegaLayer.js"},"repository":{"type":"git","url":"git+https://github.com/AMoo-Miki/leaflet-vega.git"},"license":"BSD-2-Clause","dependencies":{"vega-spec-injector":"^0.0.2"},"devDependencies":{"@babel/core":"^7.19.0","@babel/plugin-transform-runtime":"^7.18.10","@babel/plugin-transform-async-to-generator":"^7.18.6","@babel/preset-env":"^7.19.0","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^14.0.1","eslint":"^8.23.0","eslint-config-airbnb-base":"^15.0.0","eslint-config-kartotherian":"^0.0.2","eslint-config-mourner":"^3.0.0","rollup":"^2.79.0"},"scripts":{"test":"eslint src","precommit":"npm run test","build":"rollup -c rollup.config.js","prepare":"npm run test && npm run build","dev":"rollup -c rollup.config.js -w"},"gitHead":"f820134a14a357ed0c4f9403b6794206f03a22e0","bugs":{"url":"https://github.com/AMoo-Miki/leaflet-vega/issues"},"_id":"@amoo-miki/leaflet-vega@0.8.8","_nodeVersion":"14.20.0","_npmVersion":"8.16.0","dist":{"integrity":"sha512-W2gGgFDxzy/XUx+fQJfz0NYVXsKl7V+G6QywiMcOV5NEodDId9c60up7NNf+cfM7ggpo+5BuLqrKmosuGO1CsA==","shasum":"675abf37d72fbea859755e982f4fd19dea776557","tarball":"https://registry.npmjs.org/@amoo-miki/leaflet-vega/-/leaflet-vega-0.8.8.tgz","fileCount":11,"unpackedSize":81105,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDb6RQ80nwGwHy4W4bUiWN4LqmCq+5fkYE9LsKvhIip7wIhAJhKgNMgm9voFJn4QRSyz0MHIC7ua3zN89MM/g1VMzXq"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjHqT9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp+qA/9ExJuUxbzENyPkLDKPSQGeFkmVrxj/rIrvJplGznAntdd22OU\r\nszPPtbvI1WU1Vh+YIiI5l/Xyj/UPbEcXFsgO7qS9uvVyDRunjV3JsGOifoK4\r\nt1/kCeSBg4JI4QxNzSOiN8iTFTvRn3y866jHsU+X9Try6nsVwov+xMh2xMj7\r\naZng9sPMsO0ezzAxdwNRLZKGScbkkFafij3Rvm3t4aI6BUei3Iu9Rm92TNBj\r\nt16aZZa2AQpP0Ybe0M28tzdKHlEfLn3BCCiuafyXnCGNEOShCY2QgJUMLGNh\r\nid++0vTy1Wt5DBhsLrl/8lSh933fhDjgBV8qgzdJ4gjmpmpWfH/q9GrvC9aU\r\nslUCIJs2xJ8rzhcZpelYq89lqLCbX0/gsBXV9ykjbync9BO8buxaA4m/NrOF\r\nDaqoYWnowzyJtU2UGsVdYEcXSHroFcI042/D16ZonokK695LCEbRM1tBanQt\r\n5aL81kQN79sEERYDrdxuAGRRQOK572PtyJ7yAOXpoI2/zz/MP/LHLMatr2Qp\r\n1oS43Etbno3w54IpjguubENErFEWRzqqOu7XjmVTWMnYO+VULUV8bN0tquiq\r\nNfH7THji8HgQbUZnxiUSOrhOuwvEQgcSI+D8L2YIRrcqDtJwTTNW6mZJbRM0\r\nF9/0057zCiT6ZNKHJC6xDNVWTDIIjrmH6do=\r\n=N5I7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"amoo_miki","email":"amoo_miki@yahoo.com"},"directories":{},"maintainers":[{"name":"amoo_miki","email":"amoo_miki@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/leaflet-vega_0.8.8_1662952701232_0.3585254062534351"},"_hasShrinkwrap":false}},"time":{"created":"2022-09-10T23:03:23.904Z","0.8.7":"2022-09-10T23:03:24.148Z","modified":"2022-09-12T03:18:21.568Z","0.8.8":"2022-09-12T03:18:21.496Z"},"maintainers":[{"name":"amoo_miki","email":"amoo_miki@yahoo.com"}],"description":"Vega layer for Leaflet","homepage":"https://github.com/AMoo-Miki/leaflet-vega","keywords":["vega","leaflet"],"repository":{"type":"git","url":"git+https://github.com/AMoo-Miki/leaflet-vega.git"},"contributors":[{"name":"Nathan Reese","email":"reese.nathan@gmail.com"},{"name":"AMoo-Miki"}],"author":{"name":"Yuri Astrakhan","email":"YuriAstrakhan@gmail.com"},"bugs":{"url":"https://github.com/AMoo-Miki/leaflet-vega/issues"},"license":"BSD-2-Clause","readme":"[![Build Status](https://travis-ci.org/nyurik/leaflet-vega.svg?branch=master)](https://travis-ci.org/nyurik/leaflet-vega) [![npm version](https://img.shields.io/npm/v/leaflet-vega.svg?style=flat-square)](https://www.npmjs.com/package/leaflet-vega)\n\n# leaflet-vega\nLeaflet layer based on Vega visualization grammar\n\n[![Leaflet Vega layer demo](https://img.youtube.com/vi/SBzDVXWdJWQ/0.jpg)](https://www.youtube.com/watch?v=SBzDVXWdJWQ)\n\nThis Leaflet plugin adds a Vega layer on top of the map, and provides two way signaling between Leaflet and Vega. This way a complex Vega-based visualization can be added to a map without any additional JavaScript.\n\n# Getting started\n* Clone the repo\n* open `demo/demo.html` file directly in your browser. No server is needed.\n\n# Usage (code)\n```javascript\n  const map = L.map('map');\n\n  // Optionally, add a base layer\n  L.tileLayer('https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}.png', {\n    attribution: '&copy; <a href=\"http://osm.org/copyright\">OpenStreetMap</a> contributors'\n  }).addTo(map);\n\n  // Add a Vega graph to the map\n  L.vegaLayer(vegaGrapSpec).addTo(map);\n```\n\nOptionally, provide additional parameters to vegaLayer():\n* `vega` - custom instance of Vega library\n* `parseConfig` - Config to be passed to the Vega parse method\n* `parseOptions` - Options to be passed to the Vega parse method\n* `viewConfig` - Config to be passed ot the Vega View constructor\n\n\n# Usage (Vega spec)\n\nYour Vega spec may read `latitude`, `longitude`, and `zoom` signals, as well as set new values to them, e.g. if you need to change zoom level dynamically.  Additionally, you may use `setMapView()` expression function to modify all of them at once. For example, if you have a set of regions on a map, and clicking the region should center the map, you can use this code (see demo file):\n```yaml\n\"on\": [{\n  \"events\": \"@region:click\",\n  \"update\": \"setMapView(geoCentroid(null, datum))\"\n}]\n```\n\nThe `setMapView()` can be used in any of these forms:\n```yaml\nsetMapView(latitude, longitude);         // center\nsetMapView(latitude, longitude, zoom);   // center and zoom\nsetMapView([longitude, latitude]);       // center with single array arg\nsetMapView([longitude, latitude], zoom); // center and zoom\nsetMapView([[lng1, lat1],[lng2, lat2]]); // bounding box center and zoom\n```\n\nAll Vega specs are pre-populated with the following template. Your Vega graph may use any of the signals and the projection directly without declaring them, just like you use `width` or `height` signals.\n\n```yaml\n{\n  \"padding\": 0,\n  \"autosize\": \"none\",\n\n  // If true, graph will be repainted only after the map has finished moving\n  // When false, map move is not as smooth, but it allows some visual elements\n  // to stay in one place - such as the legend.\n  \"delayRepaint\": true,\n\n  // These signals are two-way bound with Leaflet\n  // A vega spec may alter the declaration to update signal value when needed\n  // For example, your spec may override zoom/lat/long definition to control map position:\n  //    {\"name\": \"zoom\", \"on\": ..., \"update\": ...}\n  \"signals\": [\n    {\"name\": \"zoom\"},\n    {\"name\": \"latitude\"},\n    {\"name\": \"longitude\"}\n  ],\n\n  // For convenience, this preset projection is injected if not defined by the user.\n  \"projections\": [\n    {\n      \"name\": \"projection\",\n      \"type\": \"mercator\",\n      // 256 is the tile size in pixels. The world width is (256 * 2^zoom)\n      // d3 mercator scaling is (world / 2 / PI)\n      \"scale\": {\"signal\": \"256*pow(2,zoom)/2/PI\"},\n      \"rotate\": [{\"signal\": \"-longitude\"}, 0, 0],\n      \"center\": [0, {\"signal\": \"latitude\"}],\n      \"translate\": [{\"signal\": \"width/2\"}, {\"signal\": \"height/2\"}],\n      \"fit\": false\n    }\n  ]\n}\n```\n","readmeFilename":"README.md"}