{"_id":"mapboxgl-spiderifier","_rev":"20-b85d671d538e881f358729bdd77919f6","name":"mapboxgl-spiderifier","description":"Spiderify markers on mapbox-gl using marker overlays.","dist-tags":{"latest":"1.0.10"},"versions":{"1.0.0":{"name":"mapboxgl-spiderifier","version":"1.0.0","description":"Spiderify markers on mapbox-gl using marker overlays. Note it does not create the spiderfication in the canvas but on a overlay on top of the canvas. This uses mapboxgl.Marker to create markers and spider legs.","main":"lib/mapboxgl-spiderifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"13160069739c57ad7d0240371b9ba79988e1c439","_id":"mapboxgl-spiderifier@1.0.0","_shasum":"826694dbedbb9d9839ca15bd94559d43273fbdab","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"mimio","email":"hello@mimio.io"},"dist":{"shasum":"826694dbedbb9d9839ca15bd94559d43273fbdab","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.0.tgz","integrity":"sha512-mr9LIHnHtjtHSjz1pYZnGCLifOg7vilRXz/AEvj/Lqo3gfQUSaMRsWlArWLRCN78wYrRhSTcJ3cZzM3TNp1GWw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICMVHuv6MLvWVhxLvqbHJMIYWP7jbPLHD3FNy9X5EdKBAiBj8NFhIEJDSA/6qiRoancuttuzEjozc55OaDG1kXvgIA=="}]},"maintainers":[{"name":"mimio","email":"hello@mimio.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier-1.0.0.tgz_1506478741886_0.652793139917776"}},"1.0.1":{"name":"mapboxgl-spiderifier","version":"1.0.1","description":"Spiderify markers on mapbox-gl using marker overlays. Note it does not create the spiderfication in the canvas but on a overlay on top of the canvas. This uses mapboxgl.Marker to create markers and spider legs.","main":"lib/mapboxgl-spiderifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"af7ac0d3414041f0699279f01e8ce74391babfb8","_id":"mapboxgl-spiderifier@1.0.1","_shasum":"492ae361721809e81cb887d3327bd8db83ce79dd","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"mimio","email":"hello@mimio.io"},"dist":{"shasum":"492ae361721809e81cb887d3327bd8db83ce79dd","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.1.tgz","integrity":"sha512-bYnPM01rMsLtX7HdwhN2UYIpMMxGAmNRGoENdcjuEDPSmKTLCnMtYehdUemSaIb2KkqZ9LKgXD/ASoG7w1E0lA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEE2/kPZadG8MTW7Kem4iodRlWs8TE6H3FZvVGjd3K+SAiEAoTPCiHXPPKUrLzATMzlv+NG91oQob3dQPdJvlgKzfLU="}]},"maintainers":[{"name":"mimio","email":"hello@mimio.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier-1.0.1.tgz_1506485307764_0.6243091770447791"}},"1.0.2":{"name":"mapboxgl-spiderifier","version":"1.0.2","description":"Spiderify markers on mapbox-gl using marker overlays. Note it does not create the spiderfication in the canvas but on a overlay on top of the canvas. This uses mapboxgl.Marker to create markers and spider legs.","main":"lib/mapboxgl-spiderifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"cda108acbf18278d6e50289de0c05bf441356875","_id":"mapboxgl-spiderifier@1.0.2","_shasum":"90ba1eeb58423a797fd19e84cb13657f1b572bac","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"mimio","email":"hello@mimio.io"},"dist":{"shasum":"90ba1eeb58423a797fd19e84cb13657f1b572bac","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.2.tgz","integrity":"sha512-rRxoWHYWRvh893ODHuy9SWaXo3O1fx7xCL8iFw8ev0bDrhIt6BDxoK1KK/etkavk0JnHec/ClLb0IBaukIVIDA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDoA4xVfaJg3lJgPpz0zUoPuRRqBIEXa0C1sW4NGb9OjgIgIYLwQoOomve+ZpG05Q5WHTlYtaTAsuLhjCe4NhBPnNs="}]},"maintainers":[{"name":"mimio","email":"hello@mimio.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier-1.0.2.tgz_1506797648712_0.6318524582311511"}},"1.0.3":{"name":"mapboxgl-spiderifier","version":"1.0.3","description":"Spiderify markers on mapbox-gl using marker overlays. Note it does not create the spiderfication in the canvas but on a overlay on top of the canvas. This uses mapboxgl.Marker to create markers and spider legs.","main":"lib/mapboxgl-spiderifier.js","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":[],"author":"","license":"ISC","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"cda108acbf18278d6e50289de0c05bf441356875","_id":"mapboxgl-spiderifier@1.0.3","_shasum":"59f4d831eeec465bb60bf14c8e7e7f11cdf24a96","_from":".","_npmVersion":"4.1.2","_nodeVersion":"7.7.3","_npmUser":{"name":"mimio","email":"hello@mimio.io"},"dist":{"shasum":"59f4d831eeec465bb60bf14c8e7e7f11cdf24a96","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.3.tgz","integrity":"sha512-OZseUZ8RkvdJ/kiaD7LlRZxT1AQbjxATrGa8/4LW4lWEXMInHlIAsk/v7rBApeN57GrzzHwAQyxm7s5nx35WXQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCk70KHm0muuDvAv2BfyXwwv5lePlstY37kFCyJEJr2NwIhAL4hLonDNFWUHgIJ5M//f9tjvfvu4rpSPOFj/vv053w2"}]},"maintainers":[{"name":"mimio","email":"hello@mimio.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier-1.0.3.tgz_1506954602689_0.24463290418498218"}},"1.0.7":{"name":"mapboxgl-spiderifier","version":"1.0.7","description":"Spiderify markers on mapbox-gl using marker overlays.","main":"lib/mapboxgl-spiderifier.js","style":"lib/mapboxgl-spiderifier.css","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":["mapboxgl","spiderfy"],"author":{"name":"bewithjonam"},"license":"MIT","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"19689132b0561bb2ddf24c9b8d75c855c11c951a","_id":"mapboxgl-spiderifier@1.0.7","_npmVersion":"5.4.2","_nodeVersion":"6.9.1","_npmUser":{"name":"bewithjonam","email":"bewithjonam@gmail.com"},"dist":{"integrity":"sha512-1IczO1WzGLY6YQ12rIA1rFIuFf8nzU5CBo1dEjD26nnVEOWiT/7UtFICaZ9Dq8cYdHAowL7EsLiM8z+r2m5sWA==","shasum":"cd4f720f2e0fbf8fcfbe59d4f6d820c84cf63c37","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.7.tgz","fileCount":12,"unpackedSize":2467291,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICY7evXXHJINMxjaH7t9+R7o8U3MTfX5YkiDS4JGpW/8AiEA56SsYM/XitunXKCeW63ftTgUU+ox2oMXgdKZBHoe9G8="}]},"maintainers":[{"email":"bewithjonam@gmail.com","name":"bewithjonam"},{"email":"hello@mimio.io","name":"mimio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier_1.0.7_1519625654831_0.17358425732885663"},"_hasShrinkwrap":false},"1.0.8":{"name":"mapboxgl-spiderifier","version":"1.0.8","description":"Spiderify markers on mapbox-gl using marker overlays.","main":"index.js","style":"index.css","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":["mapboxgl","spiderfy"],"author":{"name":"bewithjonam"},"license":"MIT","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"a87f128f0aca5969a08d88f1c2519b8e61ed8bda","_id":"mapboxgl-spiderifier@1.0.8","_npmVersion":"5.4.2","_nodeVersion":"6.9.1","_npmUser":{"name":"bewithjonam","email":"bewithjonam@gmail.com"},"dist":{"integrity":"sha512-TqudVtv4iZem3lxFoEw3YcCrT3JxGLqpK3DnQo02DQiJxQ8kb4rvkKNAUstGsKPat7f5UDE/NK8cLWlF3DO+7Q==","shasum":"afe282873b810dde8b2cbd20f00eb5dff1395f96","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.8.tgz","fileCount":12,"unpackedSize":2471739,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGKd4tTzWyapznR5FwpKdiXmXAc0voy8rGaBdnESuSVTAiBOylcornKI57dWZC1lz7KjVCsk2Ox/UVTk40gSGc3m/A=="}]},"maintainers":[{"email":"bewithjonam@gmail.com","name":"bewithjonam"},{"email":"hello@mimio.io","name":"mimio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier_1.0.8_1519642200288_0.25502049744899"},"_hasShrinkwrap":false},"1.0.9":{"name":"mapboxgl-spiderifier","version":"1.0.9","description":"Spiderify markers on mapbox-gl using marker overlays.","main":"index.js","style":"index.css","directories":{"doc":"docs"},"scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":["mapboxgl","spiderfy"],"author":{"name":"bewithjonam"},"license":"MIT","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","gitHead":"0b934dd37c676d15275b460ce14d96891fcf1dd9","_id":"mapboxgl-spiderifier@1.0.9","_npmVersion":"5.4.2","_nodeVersion":"6.9.1","_npmUser":{"name":"bewithjonam","email":"bewithjonam@gmail.com"},"dist":{"integrity":"sha512-qox8WOWU9MGdH4IL8wtUO/inEyivCi44e4lYStJ9BXuTGU0t2TVdu6SsnStRNqnE67n0423FfCDXycGUj9XROA==","shasum":"332d3f53eff9b4a0ea9e062dc480ddaae581f244","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.9.tgz","fileCount":12,"unpackedSize":2471773,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDSdOVPm24G/1aQSQ5+jNyCAR5xe0Suck/I/jybEapDcwIhAO8iYJXrJ2nyYqsX9GpzEy0P8Bw3ie/kaUTB1abRqXNz"}]},"maintainers":[{"email":"bewithjonam@gmail.com","name":"bewithjonam"},{"email":"hello@mimio.io","name":"mimio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier_1.0.9_1520316021388_0.7464890071906636"},"_hasShrinkwrap":false},"1.0.10":{"name":"mapboxgl-spiderifier","version":"1.0.10","description":"Spiderify markers on mapbox-gl using marker overlays.","main":"index.js","style":"index.css","directories":{"doc":"docs"},"scripts":{"lint":"eslint index.js || true","test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"keywords":["mapboxgl","spiderfy"],"author":{"name":"bewithjonam"},"license":"MIT","bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","devDependencies":{"eslint":"^4.19.1"},"gitHead":"b2286cbef4bc060bc2180d18602c52a2a3b6ffa7","_id":"mapboxgl-spiderifier@1.0.10","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-a9fq0n1hU8fD4LQhuIrfVKXFM0gUx2RDBrK52WArkLIBUCTic+epzIp/4yF0D+tkpaQj3wrxN7DQ1jLagxYWsw==","shasum":"442f0ae102bbf0d72bf5e54f1994b4f1f8e910ec","tarball":"https://registry.npmjs.org/mapboxgl-spiderifier/-/mapboxgl-spiderifier-1.0.10.tgz","fileCount":11,"unpackedSize":42368,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgeX6cCRA9TVsSAnZWagAAQnYP/2E2s1Qdk48NqNIm0+u1\n6qOorqvOMpfR4pfVanyW1H0Hb8IBuXL/enuT/FQtBwt+9Zd1LQRmZ8QE2yGh\niZySwuTt4gZ8zgavsUcdiGVNU1xrFOgQCfz6MaPQO1YjBbo3+r16IAjPmZ7i\nAUP9fj2q1w/eQXYARpSVCX8AuQ0oCZcV8BESvuG8IWKw9BUcDUnfLGQACV7p\nVSmXO4twA7rvX8BH3ccD5u9c9bJGE0TWVkU0QCHsI4wjvDIQ0R7I1ntZyu2J\nCtstWxLm4OO/wc3Zrac3G8z4LdJlvzc5liGdotjjX6QF5cuijE78iNbZwcXs\nPlpQJ7JIk5CmA4Xfcj/aVzNeZUxWafp3nT9MLuL7yISC/EyKnIxtnOfyQWbp\nH/d0yyDSLG2rdoiS4VGeg3/aLNUG2+rEmV8SdrN9QDYGYJC3tvtbkGG/wTME\nJ5x9jbK9CkBPLbz7DDW6fxEsdwI8VBr4fwYVaabSGUfVfLrNeORrJigRb8kV\n6CzcVuCQ0f1lrSZdTMkkamuofcTUWA8SMVdQ3xGJ9ub1OoMZm6cgsRn0xV2F\nbkkMjEvUO3G6a98ohrLaN97aDY/RcGNm7ZEqV6LsLqvkbE79O3UFpC5xFrgg\naZqnX3Ch9Auh8luaQtpo7hltThc3p0HnGCsZGLN1rMmvU8IcuC5gc9lIbeuD\nB2Cf\r\n=2u6u\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQD6UvhICCsQO9LXODh033lxn8z89LBobQpC+T5AsgXfXQIhALsS1GDAdvpWLl284LV8652f4HwzhmgRxzXrfBdzjto/"}]},"_npmUser":{"name":"bewithjonam","email":"bewithjonam@gmail.com"},"maintainers":[{"name":"caycepollard18","email":"caycepollard18@gmail.com"},{"name":"chiefkleef","email":"clif@mimio.io"},{"name":"mrmos","email":"mamos@mimio.io"},{"name":"garretthogan","email":"garrett.hogan.dev@gmail.com"},{"name":"bewithjonam","email":"bewithjonam@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/mapboxgl-spiderifier_1.0.10_1618575004356_0.8119946690725781"},"_hasShrinkwrap":false}},"readme":"# mapboxgl-spiderifier\n\nSpiderify markers on mapbox-gl using marker overlays. Note it does not create the spiderfication in the canvas but on a overlay on top of the canvas. This uses mapboxgl.Marker to create markers and spider legs.\n\nSpiral/Circle positioning logic taken from and credits goes to https://github.com/jawj/OverlappingMarkerSpiderfier.\n\n## Examples:\n - https://bewithjonam.github.io/mapboxgl-spiderifier/docs/index.html\n\n## Note:\nMapboxgl-js has exposed getClusterLeaves/getClusterChildren (from supercluster) in version [v0.47.0](https://github.com/mapbox/mapbox-gl-js/releases/tag/v0.47.0). Thereby, now we can get the features within a cluster from mapboxgl and spiderfy them using this library.\n\n## Usage:\n\n#### Simple Spiderfication of features\n```js\nvar features = [\n  {id: 0, type: 'car', color: 'red'},\n  {id: 1, type: 'bicycle', color: '#ff00ff'},\n  {id: 2, type: 'bus', color: 'blue'},\n  {id: 3, type: 'cab', color: 'orange'},\n  {id: 4, type: 'train', color: 'red'}\n];\nvar map = new mapboxgl.Map({\n    container: 'map',\n    style: 'mapbox://styles/mapbox/streets-v9',\n    center: [-74.50, 40],\n    zoom: 9\n  });\n\nvar spiderifier = new MapboxglSpiderifier(map, {\n  \tonClick: function(e, spiderLeg){\n    \tconsole.log('Clicked on ', spiderLeg);\n    },\n    markerWidth: 40,\n    markerHeight: 40,\n  });\n\nmap.on('style.load', function() {\n  spiderifier.spiderfy([-74.50, 40], features);\n});\n\nmap.on('click', function(){\n  spiderifier.unspiderfy();\n});\n```\n### Getting features in a cluster from mapboxgl and spiderfying them\nRefer [Example 3](https://bewithjonam.github.io/mapboxgl-spiderifier/docs/example-mapbox-gl-cluster-spiderfy.html)\n```\nmap.on('style.load', function() {\n  map.on('click', mouseClick);\n});\n\nfunction mouseClick(e) {\n  var features = map.queryRenderedFeatures(e.point, {\n      layers: [<<id of the layer containing the cluster>>]\n    });\n\n  spiderifier.unspiderfy();\n  if (!features.length) {\n    return;\n  } else {\n    map.getSource(<<source Id of the source containing the cluster>>).getClusterLeaves(\n      features[0].properties.cluster_id,\n      100,\n      0,\n      function(err, leafFeatures){\n        if (err) {\n          return console.error('error while getting leaves of a cluster', err);\n        }\n        var markers = _.map(leafFeatures, function(leafFeature){\n          return leafFeature.properties;\n        });\n        spiderifier.spiderfy(features[0].geometry.coordinates, markers);\n      }\n    );\n  }\n}\n\n```\n\n#### Custom Pins With popup:\n```js\nvar spiderifier = new MapboxglSpiderifier(map, {\n    customPin: true,\n    initializeLeg: function(spiderLeg) {\n      var $spiderPinCustom = $('<div>', {class: 'spider-point-circle'});\n\n      $(spiderLeg.elements.pin).append($spiderPinCustom);\n      $spiderPinCustom.css({\n        'width': '10px',\n        'height':'10px',\n        'margin-left': '-5px',\n        'margin-top': '-5px',\n        'background-color': spiderLeg.feature.color,\n        'opacity': 0.8\n      });\n\n      var popup = new mapboxgl.Popup({\n        closeButton: true,\n        closeOnClick: false,\n        offset: MapboxglSpiderifier.popupOffsetForSpiderLeg(spiderLeg)\n      });\n\n      popup.setHTML('Feature type is ' + spiderLeg.feature.type);\n      spiderLeg.mapboxMarker.setPopup(popup);\n\n      $(spiderLeg.elements.container)\n        .on('mouseenter', function(){\n          popup.addTo(map);\n        })\n        .on('mouseleave', function(){\n          popup.remove();\n        });\n    }\n  })\n```\n\n## Doc\n\n#### Options\n```js\nnew MapboxglSpiderifier(map, options)\n```\n\n  Constructs a mapboxgl spiderifier.\n  - `map` *(mapbox gl map mandatory)*.\n  - `options` *(object optional)*\n    - `options.animate` **(boolean default: false)**\n    - `options.animationSpeed` **(number default: 200)** number in milliseconds (animation speed)\n    - `options.circleSpiralSwitchover` **(number default: 9)** number of markers till which the spider will\n      be circular and beyond this threshold, it will spider in spiral.\n    - `options.customPin` **(boolean default: false)**\n    - `options.initializeLeg` **(function)** function to provide a custom marker/popup for markers\n      - argument1 spiderLeg\n    - `options.onClick` **(function)**\n      - argument1 clickEvent\n      - argument2 spiderLeg\n\n\n**spiderLeg** Passed in options.initializeLeg/options.onClick(callbacks) and in\nspideifier.each (iterator) function.\n```\n  {\n    feature: <object>,\n    elements: {\n      container: <DomElement>,\n      line: <DomElement>,\n      pin: <DomElement>,\n    },\n    mapboxMarker: <mapboxgl.Marker instance>,\n    params:{\n      x: <number horizontal offset of pin from the center of spider>,\n      y: <number vertical offset of pin from the center of spider>,\n      angle: <number angle of line from the center of spider>,\n      legLength: <number leg line length>,\n      index: <number index of spider leg>\n    }\n  }\n```\n\n#### Functions:\n  - ```each(function(spiderLeg) {...} )``` Iterates over the currently spiderfied legs.\n    -  ```function(spiderLeg)``` Function gets called once for every spider leg.\n  - ```spiderfy(latLng, features)``` Spiderfies and displays given markers on the specified lat lng.\n    - ```latLng```  new mapboxgl.LngLat(-122.420679, 37.772537); OR [-122.420679, 37.772537];\n    - ```features``` array of plain objects.\n  - ```unspiderfy()``` Unspiderfies markers, if any spiderfied already.\n\n  - ```MapboxglSpiderifier.popupOffsetForSpiderLeg(spiderLeg)``` returns an offset object that can be\n  passed to mapboxgl's popup so that the popup will be positioned next to the pin rather than the center\n  of the spider.\n\n## ChangeLog:\n\n1.0.8 -\n  - MapboxglSpiderfier -> MapboxglSpider***i***fier ;)\n  - options.initializeMarker(markerObject) -> options.initializeLeg(spiderLeg)\n```js\n  // Old:\n  initializeMarker(markerObject) {\n    // markerObject => {\n    //   marker: {...}, // changed to feature\n    //   elements: {\n    //     parent: <...>,\n    //     line: <...>,\n    //     marker: <...>, // changed to pin\n    //   },\n    //   \"mapboxMarker\":{...},\n    //   \"spiderParam\":{\n    //     \"x\":-4.373587244338389,\n    //     \"y\":14.3482310622655,\n    //     \"angle\":1.8666666666666667,\n    //     \"legLength\":15,\n    //     \"index\":0\n    //   }\n    // }\n    // ...\n  }\n  // New:\n  initializeLeg(spiderLeg) {\n    // spiderLeg => {\n    //   feature: {...},\n    //   elements: {\n    //     container: <...>,\n    //     line: <...>,\n    //     pin: <...>,\n    //   },\n    //   \"mapboxMarker\":{...},\n    //   \"params\":{\n    //     \"x\":-4.373587244338389,\n    //     \"y\":14.3482310622655,\n    //     \"angle\":1.8666666666666667,\n    //     \"legLength\":15,\n    //     \"index\":0\n    //   }\n    // }\n    // ...\n  }\n\n  // Old\n  // .spidered-marker\n  // | - .line-div\n  // | - .icon-div\n\n  // New\n  // .spider-leg\n  // | - .spider-leg-line\n  // | - .spider-leg-pin\n\n  Moving ./lib/mapbox-gl-spiderifier.css to ./index.css\n  Moving ./lib/mapbox-gl-spiderifier.js to ./index.js\n```\n","maintainers":[{"name":"caycepollard18","email":"caycepollard18@gmail.com"},{"name":"chiefkleef","email":"clif@mimio.io"},{"name":"mrmos","email":"mamos@mimio.io"},{"name":"garretthogan","email":"garrett.hogan.dev@gmail.com"},{"name":"bewithjonam","email":"bewithjonam@gmail.com"}],"time":{"modified":"2022-06-19T15:55:19.904Z","created":"2017-09-27T02:19:03.422Z","1.0.0":"2017-09-27T02:19:03.422Z","1.0.1":"2017-09-27T04:08:29.470Z","1.0.2":"2017-09-30T18:54:10.289Z","1.0.3":"2017-10-02T14:30:04.554Z","1.0.7":"2018-02-26T06:14:14.958Z","1.0.8":"2018-02-26T10:50:00.451Z","1.0.9":"2018-03-06T06:00:21.599Z","1.0.10":"2021-04-16T12:10:04.509Z"},"homepage":"https://github.com/mimio/mapboxgl-spiderifier#readme","keywords":["mapboxgl","spiderfy"],"repository":{"type":"git","url":"git+https://github.com/mimio/mapboxgl-spiderifier.git"},"bugs":{"url":"https://github.com/mimio/mapboxgl-spiderifier/issues"},"license":"MIT","readmeFilename":"README.md","author":{"name":"bewithjonam"}}