{"id":13816606,"url":"https://github.com/dxxzst/OfflineMap","last_synced_at":"2025-05-15T15:32:49.981Z","repository":{"id":48156441,"uuid":"97556531","full_name":"dxxzst/OfflineMap","owner":"dxxzst","description":"基于MySQL + Node.js  + Leaflet的离线地图展示，支持百度、谷歌、高德、腾讯地图","archived":false,"fork":false,"pushed_at":"2022-08-10T07:15:02.000Z","size":96,"stargazers_count":475,"open_issues_count":2,"forks_count":131,"subscribers_count":30,"default_branch":"master","last_synced_at":"2024-08-04T05:01:47.961Z","etag":null,"topics":["leaflet","map","maps","mysql","mysql-node-leaflet","offline","offline-maps"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dxxzst.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}},"created_at":"2017-07-18T05:33:08.000Z","updated_at":"2024-07-09T12:29:35.000Z","dependencies_parsed_at":"2022-08-22T08:30:18.446Z","dependency_job_id":null,"html_url":"https://github.com/dxxzst/OfflineMap","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/dxxzst%2FOfflineMap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxxzst%2FOfflineMap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxxzst%2FOfflineMap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxxzst%2FOfflineMap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxxzst","download_url":"https://codeload.github.com/dxxzst/OfflineMap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225360935,"owners_count":17462203,"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":["leaflet","map","maps","mysql","mysql-node-leaflet","offline","offline-maps"],"created_at":"2024-08-04T05:00:47.449Z","updated_at":"2024-11-19T13:30:39.760Z","avatar_url":"https://github.com/dxxzst.png","language":"JavaScript","funding_links":[],"categories":["libs"],"sub_categories":[],"readme":"# 基于MySQL + Node.js + Leaflet的离线地图展示\n\n---\n\n[![Author](https://img.shields.io/badge/author-dxxzst-orange.svg)](https://github.com/dxxzst)\n[![Stars](https://img.shields.io/github/stars/dxxzst/OfflineMap)](https://img.shields.io/github/stars/dxxzst/OfflineMap)\n[![License](https://img.shields.io/github/license/dxxzst/picx.svg)](https://github.com/dxxzst/OfflineMap/blob/master/LICENSE)\n\n\n**1. 基本说明**\n\n本项目实现了离线展示百度、谷歌、高德、腾讯地图。主要功能如下：\n\n - 实现了地图瓦片图下载、存储。目前支持存储至[MySQL][1]\n - [Node.js][2]服务调用MySQL中的瓦片图 \n - [Leaflet][3]展示地图\n\n展示效果如下：\n![展示效果][5]\n\n**2. 地图瓦片下载工具及配置**\n\n工具下载地址：https://pan.baidu.com/s/1miMF9nM\n\n工具开源地址：https://github.com/luxiaoxun/MapDownloader\n\n工具使用方法：\n\n - 数据库配置\n \n 打开工具目录中的 MapDownloader.exe.config 文件。根据实际情况填写如图中的配置信息。\n ![数据库配置][6]\n\n - 地图瓦片图下载\n \n 打开工具目录中 MapDownloader.exe -\u003e 选择画图工具、矩形 -\u003e 地图上框选区域 -\u003e 存储方式选择MySQL数据库 -\u003e Zoom根据需要选择 -\u003e 点击下载\n![下载瓦片图][7]\n\n - 数据库中存储的瓦片图\n ![数据库中存储的瓦片图][8]\n \n\u003e 备注：数据库中Type字段指的是地图类型，对于谷歌地图 普通地图（1818940751）、卫星地图（47626774）、标注（1024577166）。此工具功能丰富，可细细研究。\n\n**3. node.js服务配置**\n\n - 修改mysql.js 中的配置。根据实际情况，配置数据库链接\n ![配置数据库链接][9]\n - 进入目录 `cd OfflineMap`\n - 安装资源 `npm install`\n - 启动服务 `npm start`\n - 服务地址 `http://127.0.0.1:3001`\n\n**4. 页面展示**\n\n打开example文件夹中的map.html即可。\n\n**如本项目对您有所帮助，欢迎Star。**\n\n\n  [1]: https://www.mysql.com/\n  [2]: https://nodejs.org/en/\n  [3]: http://leafletjs.com/\n  \n  [5]: https://images2018.cnblogs.com/blog/1010568/201803/1010568-20180309204134685-1017810917.jpg\n  [6]: https://images2018.cnblogs.com/blog/1010568/201803/1010568-20180309204153057-258755990.jpg\n  [7]: https://images2018.cnblogs.com/blog/1010568/201803/1010568-20180309204751868-1305224209.jpg\n  [8]: https://images2018.cnblogs.com/blog/1010568/201803/1010568-20180309204233316-1946879164.jpg\n  [9]: https://images2018.cnblogs.com/blog/1010568/201803/1010568-20180309204244557-69518306.jpg\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxxzst%2FOfflineMap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxxzst%2FOfflineMap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxxzst%2FOfflineMap/lists"}