{"id":19438846,"url":"https://github.com/danwild/leafletjs-canvas-overlay","last_synced_at":"2025-04-24T22:32:07.869Z","repository":{"id":57289917,"uuid":"62016596","full_name":"danwild/leafletjs-canvas-overlay","owner":"danwild","description":"Repo for npm wrapper of https://gist.github.com/Sumbera/11114288","archived":false,"fork":false,"pushed_at":"2016-07-14T04:00:53.000Z","size":225,"stargazers_count":4,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T15:49:46.220Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://blog.sumbera.com/2014/04/20/leaflet-canvas/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danwild.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-06-27T01:23:38.000Z","updated_at":"2022-07-27T02:40:24.000Z","dependencies_parsed_at":"2022-08-25T05:20:17.628Z","dependency_job_id":null,"html_url":"https://github.com/danwild/leafletjs-canvas-overlay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danwild%2Fleafletjs-canvas-overlay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danwild%2Fleafletjs-canvas-overlay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danwild%2Fleafletjs-canvas-overlay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danwild%2Fleafletjs-canvas-overlay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danwild","download_url":"https://codeload.github.com/danwild/leafletjs-canvas-overlay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250719724,"owners_count":21476131,"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":[],"created_at":"2024-11-10T15:19:57.667Z","updated_at":"2025-04-24T22:32:07.630Z","avatar_url":"https://github.com/danwild.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Leaflet Full view Canvas Overlay - straightforward full screen canvas overlay that calls custom user function for drawing.\nMostly extracted from [here](https://github.com/Leaflet/Leaflet.heat) added resize and few other parameters for callback\nCompare to same data SVG rendering [here](http://bl.ocks.org/Sumbera/7e8e57368175a1433791)\n\n\t\t//Example:\n\t\tL.canvasOverlay()\n\t\t   .params({data: points})     // optional add any custom data that will be passed to draw function\n\t           .drawing(drawingOnCanvas)   // set drawing function\n\t           .addTo(leafletMap);         // add this layer to leaflet map\n\t            \n\n\t\t//Custom drawing function:\n\t\t\tfunction drawingOnCanvas(canvasOverlay, params) {\n\t\t            var ctx = params.canvas.getContext('2d');\n\t\t            params.options.data.map(function (d, i) {\n\t\t              // canvas drawing goes here\n\t\t            });\n\t\t        };\n\t\t        \n\t\t// parameters passed to custom draw function :\n\t\t {\n                                    canvas   : \u003ccanvas\u003e,\n                                    bounds   : \u003cbounds in WGS84\u003e\n                                    size     : \u003cview size\u003e,\n                                    zoomScale: \u003czoom scale is  1/resolution\u003e,\n                                    zoom     : \u003ccurrent zoom\u003e,\n                                    options  : \u003coptions passed \u003e\n                 };\n\nOther useful full view  Leaflet Canvas sources here:\n- [leaflet.heat](https://github.com/Leaflet/Leaflet.heat)\n- [Full Canvas] (https://github.com/cyrilcherian/Leaflet-Fullcanvas)\n- [CartoDb Leaflet.Canvas] (https://github.com/CartoDB/Leaflet.CanvasLayer)\n \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanwild%2Fleafletjs-canvas-overlay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanwild%2Fleafletjs-canvas-overlay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanwild%2Fleafletjs-canvas-overlay/lists"}