{"id":25955640,"url":"https://github.com/tcoupin/leaflet-paintpolygon","last_synced_at":"2025-03-04T16:33:07.801Z","repository":{"id":41186729,"uuid":"132928726","full_name":"tcoupin/leaflet-paintpolygon","owner":"tcoupin","description":"Leaflet plugin to create polygon with circle as paint","archived":false,"fork":false,"pushed_at":"2024-03-14T19:56:06.000Z","size":303,"stargazers_count":48,"open_issues_count":7,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-03-14T20:57:22.576Z","etag":null,"topics":["brush","circle","draw","leaflet","leaflet-paintpolygon","paint","polygon","turf","turfjs"],"latest_commit_sha":null,"homepage":"https://tcoupin.github.io/leaflet-paintpolygon","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/tcoupin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-10T16:45:55.000Z","updated_at":"2024-06-19T15:01:26.166Z","dependencies_parsed_at":"2024-06-19T15:01:07.333Z","dependency_job_id":"f55c2ad5-fd90-4b41-994c-bc8a5feb8f72","html_url":"https://github.com/tcoupin/leaflet-paintpolygon","commit_stats":{"total_commits":20,"total_committers":2,"mean_commits":10.0,"dds":"0.15000000000000002","last_synced_commit":"98dc0fdb78267568ac4b2dcbfa893b394f40a2d8"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcoupin%2Fleaflet-paintpolygon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcoupin%2Fleaflet-paintpolygon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcoupin%2Fleaflet-paintpolygon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tcoupin%2Fleaflet-paintpolygon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tcoupin","download_url":"https://codeload.github.com/tcoupin/leaflet-paintpolygon/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241349165,"owners_count":19948324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["brush","circle","draw","leaflet","leaflet-paintpolygon","paint","polygon","turf","turfjs"],"created_at":"2025-03-04T16:33:07.119Z","updated_at":"2025-03-04T16:33:07.783Z","avatar_url":"https://github.com/tcoupin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"⚠️⚠️⚠️ This plugin is no more maintened since 2020. I am no more working with leaflet (and geographical data), I can't help you for solving bugs. ⚠️⚠️⚠️\n\nYou can use it at your own risk or fork it and change my name for yours on leaflet plugins page.\n\n# leaflet-paintpolygon\n\n[![Dependency Status](https://david-dm.org/tcoupin/node-pgrouting.svg)](https://david-dm.org/tcoupin/leaflet-paintpolygon)\n[![npm](https://img.shields.io/npm/dt/leaflet-paintpolygon.svg?style=flat-square)](https://www.npmjs.com/package/leaflet-paintpolygon)\n[![npm](https://img.shields.io/npm/v/leaflet-paintpolygon.svg?style=flat-square)](https://www.npmjs.com/package/leaflet-paintpolygon)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/tcoupin/leaflet-paintpolygon.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Ftcoupin%2Fleaflet-paintpolygon)\n\nCreate polygon on leaflet map like Paint[brush]! Choose your brush size and draw ! Or erase...\nMobile and desktop compatible, based on [turf.js](http://turfjs.org).\n\n\n[Demo](https://tcoupin.github.io/leaflet-paintpolygon)\n\n**Turf packages are already included in dist js.**\n\n\n## Use it\n\n```\nL.control.paintPolygon().addTo(map)\n```\n\n### Options\n\n```\n options: {\n        position: 'topright',     // position of the control\n        radius: 30,               // radius on start (pixel)\n        minRadius: 10,            // min radius (pixel)\n        maxRadius: 50,            // max radius (pixel)\n        layerOptions: {},         // path style of drawed layer (see: https://leafletjs.com/reference-1.3.0.html#path-option)\n        drawOptions: {            // path style on draw (see: https://leafletjs.com/reference-1.3.0.html#path-option)\n            weight: 1\n        },\n        eraseOptions: {           // path style on erase (see: https://leafletjs.com/reference-1.3.0.html#path-option)\n            color: '#ff324a',\n            weight: 1\n        },\n        menu: {                   // Customize menu, set to false to prevent adding control UI on map, you need to build your own UI (on map or not)\n        \tdrawErase: true,\n            size: true,\n            eraseAll: true\n        }\n}               \n```\n\n### External control\n\nAdd `menu: false` in options object to prevent UI creation and bind your own UI to controls methods. See below for API and [this example](https://tcoupin.github.io/leaflet-paintpolygon/examples/2_externalcontrol.html).\n\n## API\n\n* `setRadius(radius)`: set radius of circle (in pixel)\n* `startDraw()`: start drawing\n* `startErase()`: start erasing\n* `stop()`: stop drawing or erasing\n* `eraseAll()`: erase all...\n* `getData()`: return feature as GeoJSON\n* `setData(data)`: set the feature as GeoJSON\n* `getLayer()`: return [GeoJSON layer](https://leafletjs.com/reference-1.3.0.html#geojson)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcoupin%2Fleaflet-paintpolygon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftcoupin%2Fleaflet-paintpolygon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftcoupin%2Fleaflet-paintpolygon/lists"}