{"id":23073626,"url":"https://github.com/rrainn/maptoimage","last_synced_at":"2026-07-12T21:31:32.150Z","repository":{"id":214276458,"uuid":"736126972","full_name":"rrainn/MapToImage","owner":"rrainn","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-15T23:12:42.000Z","size":275,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-30T12:56:49.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rrainn.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":"2023-12-27T04:04:54.000Z","updated_at":"2025-07-15T23:12:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf3b3ed3-148a-4ee3-9ac8-8c7557ed68e4","html_url":"https://github.com/rrainn/MapToImage","commit_stats":null,"previous_names":["rrainn/maptoimage"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/rrainn/MapToImage","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrainn%2FMapToImage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrainn%2FMapToImage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrainn%2FMapToImage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrainn%2FMapToImage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrainn","download_url":"https://codeload.github.com/rrainn/MapToImage/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrainn%2FMapToImage/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279015058,"owners_count":26085643,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-12-16T08:18:37.940Z","updated_at":"2025-10-13T12:38:49.439Z","avatar_url":"https://github.com/rrainn.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MapToImage\n\n## Description\n\nThis is a Node.js package that allows you to convert a map to an image. You can set the dimensions of the image, the zoom level, the center of the map, and the tile servers you wish to use.\n\n## Installation\n\n```bash\nnpm install maptoimage\n```\n\n## Usage\n\n```js\nconst { mapToImage } = require(\"maptoimage\");\nconst fs = require(\"fs\");\n\n(async () =\u003e {\n\tconst img = mapToImage({\n\t\t\"image\": {\n\t\t\t\"dimensions\": {\n\t\t\t\t\"width\": 1280,\n\t\t\t\t\"height\": 720\n\t\t\t}\n\t\t},\n\t\t\"map\": {\n\t\t\t\"center\": {\n\t\t\t\t\"lat\": 39.67321,\n\t\t\t\t\"lng\": -104.95140\n\t\t\t},\n\t\t\t\"zoom\": 5,\n\t\t\t\"layers\": [\n\t\t\t\t\"https://tile.openstreetmap.org/{z}/{x}/{y}.png\",\n\t\t\t\t// https://mesonet.agron.iastate.edu/GIS/ridge.phtml\n\t\t\t\t\"https://mesonet.agron.iastate.edu/cache/tile.py/1.0.0/ridge::USCOMP-N0Q-0/{z}/{x}/{y}.png\",\n\t\t\t\tasync (z, x, y) =\u003e {\n\t\t\t\t\tconst buffer = await fs.promises.readFile(\"tile.png\");\n\t\t\t\t\treturn buffer;\n\t\t\t\t}\n\t\t\t]\n\t\t}\n\t});\n\tfs.writeFileSync(\"map.png\", img.png().toBuffer());\n})();\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\nPlease remember that the tile servers you use may have their own licenses.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrainn%2Fmaptoimage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrainn%2Fmaptoimage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrainn%2Fmaptoimage/lists"}