{"id":13609419,"url":"https://github.com/protomaps/protomaps-leaflet","last_synced_at":"2025-05-15T14:05:32.904Z","repository":{"id":41054036,"uuid":"353008509","full_name":"protomaps/protomaps-leaflet","owner":"protomaps","description":"Lightweight vector map rendering + labeling and symbology for Leaflet","archived":false,"fork":false,"pushed_at":"2025-05-04T14:48:27.000Z","size":2949,"stargazers_count":795,"open_issues_count":8,"forks_count":49,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-05-04T15:35:23.372Z","etag":null,"topics":["canvas","cartography","leaflet"],"latest_commit_sha":null,"homepage":"https://protomaps.com/docs/frontends/leaflet","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/protomaps.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"protomaps"}},"created_at":"2021-03-30T13:19:59.000Z","updated_at":"2025-05-04T14:48:28.000Z","dependencies_parsed_at":"2025-04-26T18:01:00.871Z","dependency_job_id":"b6e2e4eb-3f42-44df-a689-6a60956cfcbc","html_url":"https://github.com/protomaps/protomaps-leaflet","commit_stats":null,"previous_names":["protomaps/protomaps-leaflet","protomaps/protomaps.js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protomaps%2Fprotomaps-leaflet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protomaps%2Fprotomaps-leaflet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protomaps%2Fprotomaps-leaflet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/protomaps%2Fprotomaps-leaflet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/protomaps","download_url":"https://codeload.github.com/protomaps/protomaps-leaflet/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254355334,"owners_count":22057354,"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","cartography","leaflet"],"created_at":"2024-08-01T19:01:34.740Z","updated_at":"2025-05-15T14:05:30.146Z","avatar_url":"https://github.com/protomaps.png","language":"TypeScript","readme":"# protomaps-leaflet\r\n\r\nVector tile rendering and labeling for [Leaflet](https://github.com/Leaflet/Leaflet).\r\n\r\n[![npm](https://img.shields.io/npm/v/protomaps-leaflet)](https://www.npmjs.com/package/protomaps-leaflet)\r\n[![Test suite](https://github.com/protomaps/protomaps-leaflet/actions/workflows/node.js.yml/badge.svg)](https://github.com/protomaps/protomaps-leaflet/actions/workflows/node.js.yml)\r\n\r\n\u003cp float=\"left\"\u003e\r\n    \u003cimg src=\"benchmark/example_1.png\" width=\"400\"\u003e\r\n    \u003cimg src=\"benchmark/example_2.png\" width=\"400\"\u003e\r\n\u003c/p\u003e\r\n\r\nThis project is a complete vector tile renderer - including quality label layout - in as simple as possible of an implementation. It's an alternative to renderers like [MapLibre GL JS](https://maplibre.org) in a fraction of the size.\r\n\r\nNew projects starting from scratch should probably use MapLibre GL, but this library is useful as a drop-in replacement for raster basemaps in Leaflet, either using the [Protomaps API](https://protomaps.com/dashboard) or PMTiles on your own storage.\r\n\r\n### Features\r\n\r\n* Render interactive slippy maps with [Leaflet](https://leafletjs.com) integration\r\n* Supports variable web fonts with multiple weights and italics in a single font file\r\n* Can read normal Z/X/Y tile URLs or offline, static-hosted tile archives in [PMTiles format](https://github.com/protomaps/PMTiles)\r\n* Full out-of-the-box support for right-to-left and Indic/Brahmic writing systems\r\n* Configurable via plain JavaScript\r\n* (Advanced) Extensible API for defining your own symbolizers\r\n\r\nSee the docs on [what protomaps-leaflet is, what protomaps-leaflet is not](https://protomaps.com/docs/protomaps-js#protomapsjs-is-not)\r\n\r\n## Demos\r\n\r\n* [Simple Leaflet demo](https://protomaps.github.io/protomaps-leaflet/examples/leaflet.html)\r\n* [Satellite + labels demo](https://protomaps.github.io/protomaps-leaflet/examples/labels.html)\r\n* [GeoJSON between basemap and labels demo](https://protomaps.github.io/protomaps-leaflet/examples/sandwich.html)\r\n* [Map inset](https://protomaps.github.io/protomaps-leaflet/examples/inset.html)\r\n* [Custom fonts](https://protomaps.github.io/protomaps-leaflet/examples/fonts.html)\r\n\r\n## How to use\r\n\r\n```html\r\n\u003cscript src=\"https://unpkg.com/protomaps-leaflet@4.0.1/dist/protomaps-leaflet.js\"\u003e\u003c/script\u003e\r\n\u003cscript\u003e\r\n    const map = L.map('map')\r\n    var layer = protomapsL.leafletLayer({url:'FILE.pmtiles OR ENDPOINT/{z}/{x}/{y}.mvt',flavor:\"light\",lang:\"en\"})\r\n    layer.addTo(map)\r\n\u003c/script\u003e\r\n```\r\n\r\n## See Also\r\n* [Tangram](https://github.com/tangrams/tangram)\r\n* [KothicJS](https://github.com/kothic/kothic-js)\r\n* [Leaflet.VectorGrid](https://github.com/Leaflet/Leaflet.VectorGrid)\r\n","funding_links":["https://github.com/sponsors/protomaps"],"categories":["TypeScript","others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotomaps%2Fprotomaps-leaflet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprotomaps%2Fprotomaps-leaflet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprotomaps%2Fprotomaps-leaflet/lists"}