{"id":17508199,"url":"https://github.com/3mapslab/leaflet.streetlabels","last_synced_at":"2025-04-15T06:14:39.035Z","repository":{"id":40243236,"uuid":"160232449","full_name":"3mapslab/Leaflet.streetlabels","owner":"3mapslab","description":"Display the street labels following polylines for Leaflet","archived":false,"fork":false,"pushed_at":"2022-08-30T08:04:02.000Z","size":14872,"stargazers_count":73,"open_issues_count":4,"forks_count":12,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-15T06:14:33.221Z","etag":null,"topics":["canvas-textpath","collision","javascript","labels","leaflet","leafletjs","street-labels"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/3mapslab.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-03T18:00:20.000Z","updated_at":"2025-03-31T01:48:12.000Z","dependencies_parsed_at":"2022-07-25T18:47:29.880Z","dependency_job_id":null,"html_url":"https://github.com/3mapslab/Leaflet.streetlabels","commit_stats":null,"previous_names":["triedeti/leaflet.streetlabels"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3mapslab%2FLeaflet.streetlabels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3mapslab%2FLeaflet.streetlabels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3mapslab%2FLeaflet.streetlabels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/3mapslab%2FLeaflet.streetlabels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/3mapslab","download_url":"https://codeload.github.com/3mapslab/Leaflet.streetlabels/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249016641,"owners_count":21198833,"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":["canvas-textpath","collision","javascript","labels","leaflet","leafletjs","street-labels"],"created_at":"2024-10-20T04:12:46.455Z","updated_at":"2025-04-15T06:14:39.018Z","avatar_url":"https://github.com/3mapslab.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n![Leaflet.streetlabels](https://3mapslab.github.io/Leaflet.streetlabels/img/screenshot.png?v=11032020)\n============\n\n## Leaflet.streetlabels\nA Leaflet plugin for showing street labels along polylines.\n\nIt's working with [Leaflet](http://leafletjs.com/) as a addition to the awesome work done by yakitoritabetai [Leaflet.LabelTextCollision](https://github.com/yakitoritabetai/Leaflet.LabelTextCollision) and Viglino [Canvas-TextPath](Canvas-TextPath)\n\nThis project structure is a shameless copy of the Leaflet.fullscreen [Leaflet.fullscreen](https://github.com/Leaflet/Leaflet.fullscreen) by Leaflet.\n\n## Demo\n\nYou can rush to the [demo here.](https://3mapslab.github.io/Leaflet.streetlabels/)\n\n\n## Using this plugin\nInclude this plugin JS file on your page from the dist folder after Leaflet library, Canvas-TextPath and Leaflet.LabelTextCollision as follows:\n* Canvas-TextPath [Download from Viglino/Canvas-TextPath](https://github.com/Viglino/Canvas-TextPath)\n* Leaflet.LabelTextCollision [Download from yakitoritabetai/Leaflet.LabelTextCollision](https://github.com/yakitoritabetai/Leaflet.LabelTextCollision)\n* Leaflet.streetlabels - Use either the file inside the src/ directory, or the one in the dist/ folder\n\n### Usage\n\n``` js\n// Create a new renderer as follows (use any options as necessary):\nvar streetLabelsRenderer = new L.StreetLabels({\n      collisionFlg : true,\n      propertyName : 'name',\n      showLabelIf: function(layer) {\n        return true; //layer.properties.type == \"primary\";\n      },\n      fontStyle: {\n        dynamicFontSize: false,\n        fontSize: 10,\n        fontSizeUnit: \"px\",\n        lineWidth: 4.0,\n        fillStyle: \"black\",\n        strokeStyle: \"white\",\n      },\n    })\n\n// Create a new map and attach the renderer created above:\nvar map = new L.Map('map', {\n    renderer : streetLabelsRenderer, //Custom Canvas Renderer\n});\n```\n### Building\n\n    npm install \u0026\u0026 npm run build\n\n### Supported Leaflet Versions\n\nLeaflet 1.0 and later versions should be supported. Earlier versions probably won\\'t work (not even tested anymore).\n\n---\n\n### Contributing\n\nAny contributions to this project are more than welcome. Feel free to reach us and we will gladly include any improvements or ideas that you may have.\nPlease, fork this repository, make any changes and submit a Pull Request and we will get in touch!\n\n### Contributors\n\n| \u003ca href=\"http://jdsantos.github.io\" target=\"_blank\"\u003e**Jorge Santos**\u003c/a\u003e | \u003ca href=\"https://github.com/leoneljdias\" target=\"_blank\"\u003e**Leonel Dias**\u003c/a\u003e \n| :---: |:---:|\n| [![jdsantos](https://avatars1.githubusercontent.com/u/1708961?v=3\u0026s=50)](http://jdsantos.github.io)    | [![leoneljdias](https://avatars1.githubusercontent.com/u/4217810?v=3\u0026s=50)](http://fvcproductions.com) |\n| \u003ca href=\"https://github.com/jdsantos\" target=\"_blank\"\u003e`github.com/jdsantos`\u003c/a\u003e | \u003ca href=\"https://github.com/leoneljdias\" target=\"_blank\"\u003e`github.com/leoneljdias`\u003c/a\u003e \n\n### Support\n\nThe easiest way to seek support is by submiting an issue on this repo.\nAlso, reach out to us at one of the following places!\n\n- Website at \u003ca href=\"https://3mapslab.pt\" target=\"_blank\"\u003e`3mapslab`\u003c/a\u003e\n- Twitter at \u003ca href=\"https://twitter.com/3mapslab\" target=\"_blank\"\u003e`@3mapslab`\u003c/a\u003e\n- Facebook at \u003ca href=\"https://facebook.com/3mapslab\" target=\"_blank\"\u003e`@3mapslab`\u003c/a\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3mapslab%2Fleaflet.streetlabels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F3mapslab%2Fleaflet.streetlabels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F3mapslab%2Fleaflet.streetlabels/lists"}