{"id":15724447,"url":"https://github.com/cldellow/mapt","last_synced_at":"2025-05-13T10:40:50.130Z","repository":{"id":216895153,"uuid":"739921927","full_name":"cldellow/mapt","owner":"cldellow","description":"An opinionated workflow for building OSM tiles and styles.","archived":false,"fork":false,"pushed_at":"2024-10-09T01:46:47.000Z","size":105,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-13T05:12:24.733Z","etag":null,"topics":["openstreetmap","tilemaker","vector-tiles"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/cldellow.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":"2024-01-07T00:17:09.000Z","updated_at":"2025-01-23T01:43:44.000Z","dependencies_parsed_at":"2024-01-20T01:56:05.890Z","dependency_job_id":"f6b7cc84-6c45-42e2-8f3d-2463e15a8839","html_url":"https://github.com/cldellow/mapt","commit_stats":null,"previous_names":["cldellow/mapt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fmapt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fmapt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fmapt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cldellow%2Fmapt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cldellow","download_url":"https://codeload.github.com/cldellow/mapt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253924863,"owners_count":21985189,"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":["openstreetmap","tilemaker","vector-tiles"],"created_at":"2024-10-03T22:16:42.864Z","updated_at":"2025-05-13T10:40:50.104Z","avatar_url":"https://github.com/cldellow.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mapt\n\n`mapt` is an opinionated tool for building custom [vector tiles](https://docs.mapbox.com/data/tilesets/guides/vector-tiles-introduction/) with [tilemaker](https://github.com/systemed/tilemaker). It can also help author\n[MapLibre style sheets](https://maplibre.org/maplibre-style-spec/).\n\n`mapt` aims for a more pleasant developer workflow:\n\n- encourages thematic slices (e.g. `land`, `roads`, `boundaries`)\n  - ⚡ iterate faster when developing\n  - 🎯 create focused Lua files that are easier to understand\n- humanizes JSON config\n  - 🤝 use [JSON6](https://github.com/d3x0r/json6) for parsing `.json` files, so `//` and `/* ... */` comments, trailing commas, and naked identifiers are supported\n  - 🎨 optionally use [Tailwind CSS colour palette](https://atmos.style/palettes/tailwindcss) names like `red-50`, `red-100`, etc, not raw hex codes\n- works for dev or production\n  - 🎶 in dev mode, `mapt` dynamically renders your full map based on several input `pmtiles` and style files\n  - 🎵 in production mode, `mapt` produces a single `pmtiles` and style file, suitable for publishing to static hosting\n\n# Install\n\n`mapt` requires Bun, whose [install instructions](https://bun.sh/docs/installation) are straight-forward.\n\n`bun install --global mapt`\n\n\u003e TODO: verify this works. The package is not yet published to npmjs, and file-local packages can't be installed globally.\n\n# Usage\n\n`mapt` requires a specific file layout. Consider an example map\nthat has been factored into `land` and `water` slices. It has this\nlayout:\n\n```bash\nslices/land.json    # tilemaker config file\nslices/land.lua     # tilemaker lua profile\nslices/water.json   # tilemaker config file\nslices/water.lua    # tilemaker lua profile\nstyles/style.json   # Root MapLibre style file into which other styles\n                    # will be merged\nstyles/land.json    # Style file for land\nstyles/water.json   # Style file for water\n```\n\nYou author your Lua profiles and style files modularly. `mapt` will\nintelligently combine them together as needed.\n\n## `build`\n\n```\nmapt build file.pbf land water\n```\n\nBuild `land.pmtiles` and `water.pmtiles` with `file.pbf` as input.\n\nYour tilemaker configuration will be read from `slices/land.json`, your Lua profile from `layers/land.lua`, etc.\n\n### `--mbtiles`\n\n`--mbtiles` specifies that you want MBTiles output rather than the default PMTiles.\n\n### `--no-output`\n\n`--no-output` abuses tilemaker zoom settings to avoid writing out tiles. This is useful if you\njust want the side effect of running your Lua code, for example, perhaps your Lua code creates a SQLite\nautosuggest index.\n\n### `--single`\n\n`--single` specifies that your slices should be composited into a single Lua file. In this mode,\na single `tiles.pmtiles` file is generated.\n\n`--no-output` and `--single` may be used together.\n\n## `serve`\n\n```\nmapt serve\n```\n\nLaunches a local web server to preview your tiles:\n\n- http://localhost:8081\n  - Shows your tile files and links to [the PMTiles Viewer](https://protomaps.github.io/PMTiles/)\n- http://localhost:8081/map\n  - Stitches your style files together and renders a map of your tiles.\n\n## `style`\n\n```\nmapt style https://path-to-your/tiles.pmtiles\n```\n\nStitch your stylesheets into a single stylesheet, suitable for static hosting.\n\nThe algorithm for stitching styles is:\n\n- start with `styles/style.json` as the [root stylesheet](https://maplibre.org/maplibre-style-spec/root/)\n- for each other file in `styles/*.json`\n  - merge its `sources` key, renaming sources to avoid conflicts with other style files\n  - merge its `layers` key, prefixing `id` to avoid conflicts, and updating `source-layer` as needed\n- sort the resulting `layers` entries by `layer-z-index`, then by their original order in the source style file\n  - `layer-z-index` is the layer-specific `zindex` value defined in `slices/*.json` files\n\nThis approach constrains the expressiveness of your style files: style rules for a given layer cannot be interwoven with style rules for other layers. This is generally what you want, and failing to follow this rule can result in difficult to debug situations.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fmapt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcldellow%2Fmapt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcldellow%2Fmapt/lists"}