{"id":41314697,"url":"https://github.com/geostarters/mapbox-gl-draw-assisted-rectangle-mode","last_synced_at":"2026-01-23T05:29:09.712Z","repository":{"id":84809332,"uuid":"176715966","full_name":"geostarters/mapbox-gl-draw-assisted-rectangle-mode","owner":"geostarters","description":"Custom mode for Mapbox GL Draw that adds the functionality to draw assisted rectangles","archived":false,"fork":false,"pushed_at":"2024-06-06T06:10:19.000Z","size":6853,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-05T12:06:24.541Z","etag":null,"topics":["mapbox-gl-draw","mapbox-gl-js","vector-tiles"],"latest_commit_sha":null,"homepage":"https://geostarters.github.io/mapbox-gl-draw-assisted-rectangle-mode/index.html","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geostarters.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-20T11:09:18.000Z","updated_at":"2024-12-09T08:40:26.000Z","dependencies_parsed_at":"2024-06-06T07:30:02.094Z","dependency_job_id":"25b5dfc7-9575-4406-8750-391dfa6ae9c1","html_url":"https://github.com/geostarters/mapbox-gl-draw-assisted-rectangle-mode","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.05555555555555558,"last_synced_commit":"5091b314e9fc440999f277681af849a40df0385d"},"previous_names":["geostarters/mapbox-gl-draw-oriented-rectangle-mode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/geostarters/mapbox-gl-draw-assisted-rectangle-mode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geostarters%2Fmapbox-gl-draw-assisted-rectangle-mode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geostarters%2Fmapbox-gl-draw-assisted-rectangle-mode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geostarters%2Fmapbox-gl-draw-assisted-rectangle-mode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geostarters%2Fmapbox-gl-draw-assisted-rectangle-mode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geostarters","download_url":"https://codeload.github.com/geostarters/mapbox-gl-draw-assisted-rectangle-mode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geostarters%2Fmapbox-gl-draw-assisted-rectangle-mode/sbom","scorecard":{"id":423413,"data":{"date":"2025-08-11","repo":{"name":"github.com/geostarters/mapbox-gl-draw-assisted-rectangle-mode","commit":"4950f2f14cff8972dbe67c011615fd51c48b4b6e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/21 approved changesets -- score normalized to 0","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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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 'master'"],"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"}}]},"last_synced_at":"2025-08-19T01:45:46.263Z","repository_id":84809332,"created_at":"2025-08-19T01:45:46.263Z","updated_at":"2025-08-19T01:45:46.263Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28680694,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T04:33:33.518Z","status":"ssl_error","status_checked_at":"2026-01-23T04:33:30.433Z","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":["mapbox-gl-draw","mapbox-gl-js","vector-tiles"],"created_at":"2026-01-23T05:29:09.140Z","updated_at":"2026-01-23T05:29:09.704Z","avatar_url":"https://github.com/geostarters.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mapbox GL Draw Rectangle Assisted Mode\n[![npm version](https://badge.fury.io/js/%40geostarters%2Fmapbox-gl-draw-rectangle-assisted-mode.svg)](https://badge.fury.io/js/%40geostarters%2Fmapbox-gl-draw-rectangle-assisted-mode)\n\nThis is a custom mode for (Mapbox GL Draw) [https://github.com/mapbox/mapbox-gl-draw]  that adds the functionality to draw  assisted rectangles.\n\n\n![Assisted rectangle](draw-assisted-rectangle.gif)\n\n#### Changelog:\n\n```bash\nVersion 3.0.4: Change to Mapbox GL js v1.13.0 and fix minor dependencies \nVersion 3.0.3: Change to Mapbox GL js v1.4.0 \nVersion 3.0.2: Add custom draw rectangle style \nVersion 3.0.1: Add orientation angle calculation\nVersion 3.0.0: Draw strict rentangle mode\n```\nBased on:\n\nhttps://github.com/thegisdev/mapbox-gl-draw-rectangle-mode\n\nhttps://github.com/mapbox/mapbox-gl-draw/blob/master/src/modes/draw_polygon.js\n\n\n### Install\n\n`npm install @geostarters/mapbox-gl-draw-rectangle-assisted-mode`\n\n### Page Demo \n\nhttps://geostarters.github.io/mapbox-gl-draw-assisted-rectangle-mode/index.html\n\n### Usage\n\n```js\nimport DrawRectangle from 'mapbox-gl-draw-rectangle-assisted-mode';\n\n        mapboxgl.accessToken = '';\n        const map = new mapboxgl.Map({\n            container: 'map',\n            style: 'https://geoserveis.icgc.cat/contextmaps/icgc_mapa_base_fosc.json',\n            center: [2.079575,41.38701],\n            zoom: 17,\n            hash: true\n        });\n\n        const modes = MapboxDraw.modes;\n        modes.draw_assisted_rectangle = DrawAssistedRectangle.default;\n\n        const draw = new MapboxDraw({\n            modes: modes,\n            displayControlsDefault: false,\n            controls: {\n                polygon: true,\n                trash: true\n            },\n            userProperties: true,\n            styles: STYLES_DRAW\n        });\n        map.addControl(draw);\n        map.on('draw.create', function (feature) {\n            console.log(feature);\n        });\n    \n```\n\n\n\n### Build\n\n`npm build-web`  with browsify\n\n`npm build-all`  with babel\n\n### License\n\nMIT\n\n### Credits            \n\nDeveloped by @ICGCAT\n\nMore Info\n\u003e[https://openicgc.github.io/](https://openicgc.github.io/)\n\n\u003e[https://github.com/geostarters](https://github.com/geostarters)\n\n\u003e[http://betaportal.icgc.cat/](http://betaportal.icgc.cat/)\n\n\u003e[http://www.icgc.cat/en/](http://www.icgc.cat/en/)\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeostarters%2Fmapbox-gl-draw-assisted-rectangle-mode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeostarters%2Fmapbox-gl-draw-assisted-rectangle-mode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeostarters%2Fmapbox-gl-draw-assisted-rectangle-mode/lists"}