{"_id":"@mapbox/leaflet-pip","_rev":"295-dfd878a1260374da45510d9f7017f1e8","name":"@mapbox/leaflet-pip","description":"point in polygon searches for leaflet","dist-tags":{"latest":"1.1.0"},"versions":{"1.1.0":{"name":"@mapbox/leaflet-pip","version":"1.1.0","description":"point in polygon searches for leaflet","main":"index.js","scripts":{"test":"npm run lint && npm run test-unit","test-unit":"browserify test/*.js | tape-run","lint":"eslint index.js","build-site":"browserify site/site.js > site/bundle.js","prepublish":"browserify -s leafletPip index.js > leaflet-pip.js && uglifyjs leaflet-pip.js -c -m > leaflet-pip.min.js"},"files":["index.js","leaflet-pip.js","leaflet-pip.min.js"],"keywords":["leaflet","plugin","point","in","polygon","geo","geographical"],"repository":{"type":"git","url":"git://github.com/mapbox/leaflet-pip.git"},"devDependencies":{"browserify":"~13.0.1","eslint":"^2.2.0","phantomjs":"~2.1.7","tape":"~4.5.1","tape-run":"~2.1.4"},"author":{"name":"Tom MacWright","email":"tom@macwright.org"},"license":"ISC","dependencies":{"geojson-utils":"~1.1.0","uglify-js":"2.7.4"},"gitHead":"f550a3a352b0ac2978a9bff82ae411a20dad8546","bugs":{"url":"https://github.com/mapbox/leaflet-pip/issues"},"homepage":"https://github.com/mapbox/leaflet-pip#readme","_id":"@mapbox/leaflet-pip@1.1.0","_shasum":"4a7a4beb458c8cc24d84936fca5aba095de6e37d","_from":".","_npmVersion":"4.0.2","_nodeVersion":"4.6.2","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"dist":{"shasum":"4a7a4beb458c8cc24d84936fca5aba095de6e37d","tarball":"https://registry.npmjs.org/@mapbox/leaflet-pip/-/leaflet-pip-1.1.0.tgz","integrity":"sha512-uySBUgl8Mxv4YTTf2SKcCA0XdGL9iBJOrgMUwDk6nHdKsg840X56OTJlMnlVj+8Yz8pIDRUc0BRFnRW9TD24VA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHbSKXS2s3iE9VKlPU6NEl9rF+QgmhSe67apdmm63Y9DAiEAia4HSzPObbZlm4I0jzCe/l6cYLqt0nYHJ35e+ZA2Bo0="}]},"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/leaflet-pip-1.1.0.tgz_1480704666031_0.4287535585463047"},"directories":{}}},"readme":"## point in polygon for Leaflet\n\n[![build status](https://secure.travis-ci.org/mapbox/leaflet-pip.png)](http://travis-ci.org/mapbox/leaflet-pip)\n\nA [Leaflet](http://leafletjs.com/)-friendly API for [point in polygon](http://en.wikipedia.org/wiki/Point_in_polygon)\noperations, using [substack](https://github.com/substack)'s\n[point in polygon](https://github.com/substack/point-in-polygon) library.\n\n## install\n\nWith browserify\n\n    npm install @mapbox/leaflet-pip\n\nResolve for a CDN/packaged version:\n\n    https://unpkg.com/@mapbox/leaflet-pip@latest/leaflet-pip.js\n\n## example\n\n```\nvar gjLayer = L.geoJson(statesData);\nvar results = leafletPip.pointInLayer([-88, 38], gjLayer);\n// results is an array of L.Polygon objects containing that point\n```\n\n## api\n\n### `leafletPip.pointInLayer(point, layer L.GeoJSON, [first])`\n\nPoint can be:\n\n* A two-element array of `[lng, lat]`\n* A `L.LatLng` object\n\nLayer must be:\n\n* A `L.geoJSON` layer\n\n`first` can be:\n\n* `boolean`: `true` to accept the first match, or `false` to return all\n  polygons containing this point. This can be useful if you know that your\n  polygons are non-overlapping or don't care about more than one result,\n  since it will be much faster. By default, **this is false** and all matches\n  are returned.\n\nReturns:\n\nAn array of polygons in which the given point resides, an empty array if there\nare none. The polygons are returned as direct sublayers, so they can include\nMultiPolygons. You can call `pointInLayer` again on those if you want the\nsub-polygon result.\n\n### `leafletPip.bassackwards`\n\nLeaflet treats literate coordinate arrays as `[lat, lon]`, unlike GeoJSON\nand [any true scotsman](http://en.wikipedia.org/wiki/No_true_Scotsman). `leaflet-pip`\ntreats literate coordinate arrays as `[lon, lat]`, but if you set `bassackwards`\nto true, it'll do things the Leaflet/Google Maps API way.\n","maintainers":[{"email":"yannick.meeus+npm+production+ci@mapbox.com","name":"mbx-npm-ci-production"},{"email":"yannick.meeus+npm+staging+ci@mapbox.com","name":"mbx-npm-ci-staging"},{"email":"yannick.meeus+npm+prod+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-production"},{"email":"yannick.meeus+npm+staging+advanced+actions@mapbox.com","name":"mbx-npm-advanced-actions-staging"},{"email":"yannick.meeus+npm+prod+09@mapbox.com","name":"mbx-npm-09-production"},{"email":"yannick.meeus+npm+prod+08@mapbox.com","name":"mbx-npm-08-production"},{"email":"yannick.meeus+npm+prod+07@mapbox.com","name":"mbx-npm-07-production"},{"email":"yannick.meeus+npm+prod+06@mapbox.com","name":"mbx-npm-06-production"},{"email":"yannick.meeus+npm+prod+05@mapbox.com","name":"mbx-npm-05-production"},{"email":"yannick.meeus+npm+prod+04@mapbox.com","name":"mbx-npm-04-production"},{"email":"yannick.meeus+npm+prod+03@mapbox.com","name":"mbx-npm-03-production"},{"email":"yannick.meeus+npm+prod+02@mapbox.com","name":"mbx-npm-02-production"},{"email":"yannick.meeus+npm+prod+01@mapbox.com","name":"mbx-npm-01-production"},{"email":"yannick.meeus@mapbox.com","name":"mbx-npm-02-staging"},{"email":"accounts+npmjs-01@mapbox.com","name":"mapbox-npm-01"},{"email":"accounts+npmjs-02@mapbox.com","name":"mapbox-npm-02"},{"email":"accounts+npmjs-07@mapbox.com","name":"mapbox-npm-07"},{"email":"accounts+npmjs-03@mapbox.com","name":"mapbox-npm-03"},{"email":"accounts+npmjs-04@mapbox.com","name":"mapbox-npm-04"},{"email":"accounts+npmjs-09@mapbox.com","name":"mapbox-npm-09"},{"email":"accounts+npmjs-05@mapbox.com","name":"mapbox-npm-05"},{"email":"accounts+npmjs-06@mapbox.com","name":"mapbox-npm-06"},{"email":"accounts+npmjs-08@mapbox.com","name":"mapbox-npm-08"},{"email":"accounts+npmjs-advanced-actions@mapbox.com","name":"mapbox-npm-advanced-actions"},{"email":"accounts+npmjs-npm-ci@mapbox.com","name":"mapbox-npm-ci"},{"email":"accounts+npmjs@mapbox.com","name":"mapbox-npm"},{"email":"accounts@mapbox.com","name":"mapbox-admin"},{"email":"accounts+npm-mapbox-machine-user@mapbox.com","name":"mapbox-machine-user"}],"time":{"modified":"2023-01-12T12:43:08.120Z","created":"2016-12-02T18:51:06.587Z","1.1.0":"2016-12-02T18:51:06.587Z"},"homepage":"https://github.com/mapbox/leaflet-pip#readme","keywords":["leaflet","plugin","point","in","polygon","geo","geographical"],"repository":{"type":"git","url":"git://github.com/mapbox/leaflet-pip.git"},"author":{"name":"Tom MacWright","email":"tom@macwright.org"},"bugs":{"url":"https://github.com/mapbox/leaflet-pip/issues"},"license":"ISC","readmeFilename":"README.md"}