{"id":19164699,"url":"https://github.com/publiclab/leaflet-blurred-location-display","last_synced_at":"2026-03-04T20:04:51.523Z","repository":{"id":24276885,"uuid":"100846686","full_name":"publiclab/leaflet-blurred-location-display","owner":"publiclab","description":"A library to display points which have been \"blurred\" for privacy with leaflet-blurred-location","archived":false,"fork":false,"pushed_at":"2023-01-11T22:22:18.000Z","size":13045,"stargazers_count":11,"open_issues_count":35,"forks_count":12,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-29T06:39:32.740Z","etag":null,"topics":["javascript","leaflet","maps","privacy"],"latest_commit_sha":null,"homepage":"https://publiclab.github.io/leaflet-blurred-location-display/examples/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/publiclab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-08-20T07:52:47.000Z","updated_at":"2023-04-15T17:40:57.000Z","dependencies_parsed_at":"2022-09-22T03:51:19.051Z","dependency_job_id":null,"html_url":"https://github.com/publiclab/leaflet-blurred-location-display","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/publiclab/leaflet-blurred-location-display","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/publiclab%2Fleaflet-blurred-location-display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/publiclab%2Fleaflet-blurred-location-display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/publiclab%2Fleaflet-blurred-location-display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/publiclab%2Fleaflet-blurred-location-display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/publiclab","download_url":"https://codeload.github.com/publiclab/leaflet-blurred-location-display/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/publiclab%2Fleaflet-blurred-location-display/sbom","scorecard":{"id":749089,"data":{"date":"2025-08-11","repo":{"name":"github.com/publiclab/leaflet-blurred-location-display","commit":"966d656e08c3b72c3c76bb517f6031162d2eba90"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Code-Review","score":3,"reason":"Found 6/17 approved changesets -- score normalized to 3","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/publiclab/leaflet-blurred-location-display/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/publiclab/leaflet-blurred-location-display/tests.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/publiclab/leaflet-blurred-location-display/tests.yml/main?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/tests.yml:26","Info:   0 out of   3 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"69 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25","Warn: Project is vulnerable to: GHSA-9v3m-8fp8-mj99","Warn: Project is vulnerable to: GHSA-vc8w-jr9v-vj7f","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw","Warn: Project is vulnerable to: GHSA-wg6g-ppvx-927h","Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq","Warn: Project is vulnerable to: GHSA-vh7m-p724-62c2","Warn: Project is vulnerable to: GHSA-r9p9-mrjm-926w","Warn: Project is vulnerable to: GHSA-434g-2637-qmqr","Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m","Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw","Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p","Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747","Warn: Project is vulnerable to: GHSA-vjh7-7g9h-fjfh","Warn: Project is vulnerable to: GHSA-74fj-2j2h-c42q","Warn: Project is vulnerable to: GHSA-pw2r-vq6v-hr8c","Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc","Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3","Warn: Project is vulnerable to: MAL-2023-462","Warn: Project is vulnerable to: GHSA-j383-35pm-c5h4","Warn: Project is vulnerable to: GHSA-rm36-94g8-835r","Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq","Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm","Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp","Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37","Warn: Project is vulnerable to: GHSA-gxr4-xjj5-5px2","Warn: Project is vulnerable to: GHSA-jpcq-cgw6-v4j6","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp","Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695","Warn: Project is vulnerable to: GHSA-fvqr-27wr-82fm","Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574","Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w9mr-4mfr-499f","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-h7cp-r72f-jxh6","Warn: Project is vulnerable to: GHSA-v62p-rq8g-8h59","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp","Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr","Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7","Warn: Project is vulnerable to: GHSA-4rq4-32rv-6wp6","Warn: Project is vulnerable to: GHSA-64g7-mvw6-v9qj","Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9","Warn: Project is vulnerable to: GHSA-r628-mhmh-qjhw","Warn: Project is vulnerable to: GHSA-9r2w-394v-53qc","Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh","Warn: Project is vulnerable to: GHSA-qq89-hq3f-393p","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3","Warn: Project is vulnerable to: GHSA-34r7-q49f-h37c","Warn: Project is vulnerable to: GHSA-c9f4-xj24-8jqx","Warn: Project is vulnerable to: GHSA-g78m-2chm-r7qv"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T19:43:39.656Z","repository_id":24276885,"created_at":"2025-08-22T19:43:39.656Z","updated_at":"2025-08-22T19:43:39.656Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30091614,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T19:41:02.502Z","status":"ssl_error","status_checked_at":"2026-03-04T19:40:05.550Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","leaflet","maps","privacy"],"created_at":"2024-11-09T09:23:34.393Z","updated_at":"2026-03-04T20:04:51.498Z","avatar_url":"https://github.com/publiclab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"leaflet-blurred-location-display (LBLD)\n====\n\n[![Build Status](https://travis-ci.org/publiclab/leaflet-blurred-location-display.svg)](https://travis-ci.org/publiclab/leaflet-blurred-location-display) [![npm version](https://badge.fury.io/js/leaflet.blurred-location-display.svg)](https://badge.fury.io/js/leaflet.blurred-location-display) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com)\n\n`leaflet-blurred-location-display` is an extension of `leaflet-blurred-location` and does the following:\n\n* Cleverly dispays \"blurred\" locations, keeping privacy settings in mind.\n* Presents collections of blurred locations in a heatmap.\n* Optionally color codes the markers on the map according to the precision.\n* Fetches data from remote API or you may pass array of coordinates directly into LBLD API (see example below)\n\n# Demo\n\n1. See how markers are filtered at different zoom levels : \nhttps://publiclab.github.io/leaflet-blurred-location-display/examples/example.html\n\n2. See how markers are fetched from remote/external API : \nhttps://publiclab.github.io/leaflet-blurred-location-display/examples/index.html\n\n3. This page shows how different zoom levels and different precisons corresponds to different Human Readable blurring :\nhttps://publiclab.github.io/leaflet-blurred-location-display/examples/HumanReadableBlurring.html\n\n4. This page shows the style : heatmap property of this library which results in only colored grids without any markers : \nhttps://publiclab.github.io/leaflet-blurred-location-display/examples/simpleHeatmapStyle.html\n\n\n# Setting up leaflet-blurred-location-display\n\nTo set up the library first clone this repo to your local after that run 'npm install' to install all the neccessary packages required.\n\nLink to npm : https://www.npmjs.com/package/leaflet.blurred-location-display\n\n# Some terms used\n\n* LBLD = `leaflet-blurred-location-display`\n* LBL = `leaflet-blurred-location`\n* remote markers = markers made from external API .\n* local markers = markers made from static data provided directly into LBLD API . \n* precision = number of digits after decimal .\n* JSONparser = a function defined by User to parse external API .\n* `zoom_level` = the current zoom level of the map .\n\n# Options \n\n## Basic\n\n#### Define standard leaflet map object :\n\n```js\nvar map123 = L.map('map').setView([23,77] , 3) ; // There should be a div with id = 'map' .\n```\n\n#### Define the LBL object :\n\nSee https://github.com/publiclab/leaflet-blurred-location for more details \n\n```js\nvar BlurredLocation = new BlurredLocation();\nblurredLocation.addTo(map123) ;\n```\n\n#### Define LBLD object : \n    \n```js\nvar blurredLocationDisplay = new BlurredLocationDisplay(options_display) ;\n```\n\nYou need to pass some LBLD settings in the `options_display` object above , which are explained in the next section :\n\n#### Various fields in `options_display` : \n\n```js\nvar options_display = {\n  blurredLocation: BlurredLocation,\n  locations: locations,\n  source_url: \"https://publiclab.org/api/srch/nearbyPeople\",\n  JSONparser: JSONparser,\n  zoom_filter: zoom_filter,\n  color_code_markers: false, // by default this is false .\n  style: 'both' // or 'heatmap' or 'markers' , by default is 'both'\n}\n```\n\n*    `blurredLocation` : This is compulsory field , you have to pass the LBL object here .\n*    `locations` : You can pass some local data directly to LBLD API in the form of array .\n*    `source_url`: URL to external API to fetch data and show on map .\n*    `JSONparser`: JSON parser function for your API URL provided .\n*    `popupDisplay`: Function to build the display for the marker popup content .\n*    `zoom_filter` : An array signifying the range of zoom levels where particular precision markers should be visible .\n*    `color_code_markers` : If `true` , then markers would be color coded according to the precision of its coordinates . \n*    `style` : can be `both` where markers and heatmap both are drawn , `markers` for showing only markers and `heatmap` for                showing  only heatmap .\n\nAll these parameters are explained in detail below : \n\n#### There are 2 ways to show data using LBLD : \n*  Pass the data directly to LBLD object locally . \n*  Pass the URL of JSON data and a custom JSON parser function .\n\n##### 1.) Passing Coordinates directly into the LBLD API :\n\nFirst, you need to make some blurred locations. Let's create 3 of them :\n\n```js\nlocations = [[23.1 ,      77.1],\n             [20.1 ,      76.1],\n             [21.111 ,    76.111];\n```\nNow you can pass them to the `options_display` object as following : \n\n```js\nvar options_display = {\n  blurredLocation: BlurredLocation, // compulsory to pass\n  locations: locations\n}\n```\n\n##### 2.) Using external API to fetch data :\n\nPass the URL in the `source_url` field and a JSON parser function for your API (you can take a look at the default JSON parser below to make your own !) .\n\n```js\nvar options_display = {\n    blurredLocation: BlurredLocation, // compulsory to pass\n    source_url: \"https://publiclab.org/api/srch/nearbyPeople\", // external API \n    JSONparser: function jsonParser(result) { } // function to parse the above API\n  }\n```\n\n* JSONparser for external API:\n    1. Make an array of object.\n    2. Each object should have same parameters - `id`, `url`, `latitude`, `longitude`, `title`.\n    3. All the above parameters are used to make pop-up of each marker.\n    4. The below is also the default JSONparser which will be used automatically if you do not provide your own .\n\n```js\nfunction JSONparser(data) {\n  parsed_data = []; \n  if (!!data.items) {\n    for (i = 0 ; i \u003c data.items.length; i++) {\n      let obj = {};\n      obj[\"id\"] = data.items[i].doc_id;\n      obj[\"url\"] = data.items[i].doc_url;\n      obj[\"latitude\"] = parseFloat(data.items[i].latitude);\n      obj[\"longitude\"] = parseFloat(data.items[i].longitude);\n      obj[\"title\"] = data.items[i].doc_title;\n      parsed_data[parsed_data.length] = obj;\n    }\n  }\n  return parsed_data; \n}\n```\n\n* popupDisplay for external API:\n    1. Make a string containing the HTML elements you want displayed for each marker popup.\n    2. Can use all the parameters from JSONparser by referencing the object.\n    4. The below is also the default popupDisplay which will be used automatically if you do not provide your own.\n\n```js\nfunction popupDisplay(obj) {\n  var popup_content = \"\";\n  popup_content += \"\u003ch5\u003e\u003ca href='\" + obj.url + \"'\u003e@\" + obj.title + \"\u003c/a\u003e\u003c/h5\u003e\";\n  return popup_content\n}\n```\n\n**[NOTE: We can use external API and also pass local data simultaneously !]\n\n\n#### `zoom_filter` : Changing the zoom levels range where 'x' precision marker should be visible : \n\n```js\n    // [lower zoom level , upper zoom level , \u003e= precision allowed]\n      zoom_filter = [[0,4,0] , [5,7,2] , [8,11,4] , [12,18,5]];             \n```\nThe first number signifies the lower zoom level. \n\nThe second number signifies the upper zoom level. \n\nThe last number signifies that all markers having precision greater than equal to this number should be shown between lower zoom level and upper zoom level range.\n\nThe default zoom level filter array is: \n\n```js\nzoom_filter = [[0,4,0] , [5,7,2] , [8,11,4] , [12,18,5]] ;             \n```\n\n#### Style parameter : \n\n1.) style = `heatmap` shows only heatmap on map: \n\n![heatmap](https://user-images.githubusercontent.com/14952645/55791553-5e207080-5adc-11e9-89f8-5df6eaf63965.png)\n\n2.) style = `markers` shows only markers on map:\n\n![markers](https://user-images.githubusercontent.com/14952645/55819532-9ba1ef80-5b16-11e9-8f38-1276f5d4f046.png)\n\n3.) style = `both` shows both heatmap and markers on map:\n\n![both](https://publiclab.org/i/30983.png)\n\n#### Markers color coding parameter : \n\nWe can switch on the markers color coding feature which colors the markers according to the precision of its coordinates using `color_code_markers` parameter which is by default `false`.\n\nThe following table is used for color coding : \n\n| Precision  |  Color of marker  |\n|------------|-------------------|\n|\t0\t\t |\t\tBlue\t\t |\n|\t1\t\t |\t\tRed\t\t\t |\n|\t2\t\t |\t\tOrange\t\t |\n|\t3\t\t |\t\tGreen\t\t |\n|\t4\t\t |\t\tBlack\t     |\n|   5        |      Grey    \t |\n|   \u003e=6      |      Yellow   \t |\n\n*    When `color_code_markers` set to `true` : \n\n  ![true](https://user-images.githubusercontent.com/14952645/55820032-c3458780-5b17-11e9-8537-a54b4ec4212d.png)\n\n\n*    When `color_code_markers` set to `false` : \n\n  ![false](https://user-images.githubusercontent.com/14952645/55820014-baed4c80-5b17-11e9-8c86-fa3b462a4b33.png)   \n\n# Human-readable blurring : \n\nGiven `zoom_filter = [[0,4,0] , [5,7,2] , [8,11,4] , [12,18,5]] ;` ,\n\nOur table to correlate zoom level, precision, and human-readable scale (from \"country\" to \"building\") is as follows:\n\nZoom level | Lat/lon coordinate precision | Human-readable placename\n--|----|---\n0 | `\u003e= 0` | planet\n3 | `\u003e= 0` | country\n4 | `\u003e= 0` | country , state\n5 | `\u003e= 2` | country , state , province\n6 | `\u003e= 2` | country , state , province , region\n11 | `\u003e= 4` | neighbourhood\n13 | `\u003e= 5` | Exact Block\n\n# API\n\n| Methods         | Use                    | Usage (Example)|\n|-----------------|------------------------|----------------|\n|`getVisibleLocations()`       | returns array of markers of the input coordinates currently on map ! .|  `blurredLocationDisplay.getVisibleLocations() //This would return the array of all the input coordinates currently visible on map`|\n|`getMarkersOfPrecision({min: int , max: int})`        |returns array - with source parameter indicating either `remote` or `local` marker with precision between `min` and `max` value {all markers are currently visible on map} . |`blurredLocationDisplay.getMarkersOfPrecision({min: 2 , max: 3}) //This would return 1 array - remote markers array and local markers array - having precision between 2 and 3`|\n|`getMarkersOfPrecision(int)`       | returns array - with source parameter indicating either `remote` or `local` marker {all markers are currently visible on map} |`blurredLocationDisplay.getMarkersOfPrecision(2) //This would return 1 array - remote markers array and local markers array - having precision = 2 `|\n|`filterCoordinatesToPrecison(int)`       | returns array of input coordinates with precision = (int) |`blurredLocationDisplay.filterCoordinatesToPrecison(2) //This would return array of coordinates with precision = 2 only `|\n\n\n# Features\n\n| Feature         | Use                                                        |\n|-----------------|------------------------------------------------------------|\n| **'Blurred' location display** | Your exact location won't be posted, only the grid square it falls within will be shown till the level of precision you have set to your location.|\n| **'Blurred' human-readable location display** | The name of the location you added will be displayed till the level of precision you set as the extent of address depends on the precision level you currently are on. For instance for precision 0 only the country name will be provided as you zoom in precision will increase and so will the address details, such as state, city, etc. |\n\n\n\n#### 1.) Lower the precision , Greater the privacy :\n\nThe red markers corresponds to coordinates \\[23.1 , 77.1\\] , \\[20.1 , 76.1\\] having precision of 1 . At lower zoom level 5\\*\\*\\*\\* , these red markers are visible on map . ![image description](https://publiclab.org/i/30975.png)\n\nBut as you zoom in to level 6 , these red markers are removed from the map whereas other high precision markers are still visible .  \n![image description](https://publiclab.org/i/30976.png)\n\n#### 2.) Color Coding of the markers :\n\nAccording to the precision of the coordinates , different colors are given to the markers .\n\nPrecision = 0 , Blue colored markers .\n\nPrecision = 1 , Red colored markers .\n\nPrecision = 2 , Orange colored markers .\n\nPrecision = 3 , Green colored markers .\n\nPrecision = 4 , Black colored markers .\n\nPrecision = 5 , Grey colored markers .\n\nPrecision \\\u003e= 6 , Yellow colored markers .\n\nAlso clicking the markers shows a pop-up telling the precision :  \n![image description](https://publiclab.org/i/30981.png)\n\n---------\n\n#### 3.) Heat map :\n\n**Greater the markers in a region , Darker the color .**\n\nWe wanted to give an easy visualization power , so we implemented this grid heat map .\n\n![image description](https://publiclab.org/i/30983.png)\n\nThe default color of grid is : #F3F0C0\n\nIf number of markers are in range [1,10] , the color is : `#FFA500`\n\nIf number of markers are in range [11,15] , the color is : `#faff05`\n\nIf number of markers are in range [16,25] , the color is : `#FF6347`\n\nIf number of markers are in range [26,35] , the color is : `#FF4500`\n\nIf number of markers are in range [36,45] , the color is : `#FF0000`\n\nIf number of markers are greater than 45 , the color is : `#8B0000`\n\nNOTE : Clicking on each rectangle shows the pop-up showing number of markers in that rectangle .\n\n\n## Testing\n\nAutomated tests are an essential way to ensure that new changes don't break existing functionality, and can help you be confident that your code is ready to be merged in. We use Jasmine for testing: https://jasmine.github.io/2.4/introduction.html\n\nTo run tests, open /test.html in a browser. If you have phantomjs installed, you can run `grunt jasmine` to run tests on the commandline.\n\nYou can find the installation instructions for phantomjs in its official [build documentation](http://phantomjs.org/build.html). For Ubuntu/debian based system you can follow [these instructions](https://gist.github.com/julionc/7476620) or use the script mentioned there.\n\nTo add new tests, edit the `*_spec.js` files in `/spec/javascripts/`.\n\n## Developers\n\nHelp improve Public Lab software!\n\n* Look for open issues at https://github.com/publiclab/leaflet-blurred-location-display/issues\n* We're specifically asking for help with issues labelled with [help-wanted](https://github.com/publiclab/leaflet-blurred-location-display/labels/help-wanted) tag\n* Find lots of info on contributing at http://publiclab.org/wiki/developers\n* Review specific contributor guidelines at http://publiclab.org/wiki/contributing-to-public-lab-software\n* Some devs hang out in http://publiclab.org/chat (irc webchat)\n* Join our gitter chat at https://gitter.im/publiclab/publiclab\n\n## First Time?\n\nNew to open source/free software? Here is a selection of issues we've made especially for first-timers. We're here to help, so just ask if one looks interesting : https://github.com/publiclab/eaflet-blurred-location-display/labels/first-timers-only\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubliclab%2Fleaflet-blurred-location-display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpubliclab%2Fleaflet-blurred-location-display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpubliclab%2Fleaflet-blurred-location-display/lists"}