{"id":15034148,"url":"https://github.com/htoooth/leaflet.chinesetmsproviders","last_synced_at":"2025-05-15T13:07:19.585Z","repository":{"id":13562553,"uuid":"16254820","full_name":"htoooth/Leaflet.ChineseTmsProviders","owner":"htoooth","description":"Provider for Chinese Tms Service","archived":false,"fork":false,"pushed_at":"2022-07-08T10:08:20.000Z","size":139,"stargazers_count":1051,"open_issues_count":18,"forks_count":306,"subscribers_count":37,"default_branch":"master","last_synced_at":"2025-05-15T13:07:13.515Z","etag":null,"topics":["epsg","javascript","leaflet","tile-provider","tilelayer"],"latest_commit_sha":null,"homepage":"https://htoooth.github.io/Leaflet.ChineseTmsProviders/","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/htoooth.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":"2014-01-26T14:52:26.000Z","updated_at":"2025-05-15T08:14:29.000Z","dependencies_parsed_at":"2022-07-10T02:30:37.739Z","dependency_job_id":null,"html_url":"https://github.com/htoooth/Leaflet.ChineseTmsProviders","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/htoooth%2FLeaflet.ChineseTmsProviders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htoooth%2FLeaflet.ChineseTmsProviders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htoooth%2FLeaflet.ChineseTmsProviders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/htoooth%2FLeaflet.ChineseTmsProviders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/htoooth","download_url":"https://codeload.github.com/htoooth/Leaflet.ChineseTmsProviders/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254346624,"owners_count":22055808,"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":["epsg","javascript","leaflet","tile-provider","tilelayer"],"created_at":"2024-09-24T20:24:05.216Z","updated_at":"2025-05-15T13:07:14.570Z","avatar_url":"https://github.com/htoooth.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leaflet.ChineseTmsProviders\r\n\r\nAn extension to [Leaflet](http://leafletjs.com/) that contains configurations for various Chinese tile providers.\r\n\r\n## Usage\r\n\r\n```bash\r\nnpm i leaflet.chinatmsproviders\r\n```\r\n\r\nLeaflet-ChineseTmsProviders [providers](#providers) are refered to with a `provider.\u003cvariant\u003e.\u003ctype\u003e` -string. Let's say you want to add the nice `Normal.Map` base layers from `www.tianditu.com` to your map, you pass `TianDiTu.Normal.Map` to the `L.tileLayer.chinaProvider`-constructor, which will return a `L.TileLayer` instance for TianDiTu Normal Map tile layer.\r\n```Javascript\r\n//add TianDiTu Normal Map Layer to map.\r\nL.tileLayer.chinaProvider('TianDiTu.Normal.Map').addTo(map);\r\n```\r\n\r\n## Example\r\n\r\n```Javascript\r\nvar map = L.map('map', {\r\n    center: [31.59, 120.29],\r\n    zoom: 12\r\n});\r\n\r\nL.tileLayer.chinaProvider('TianDiTu.Normal.Map',{maxZoom:18,minZoom:5}).addTo(map);\r\nL.tileLayer.chinaProvider('TianDiTu.Normal.Annotion',{maxZoom:18,minZoom:5}).addTo(map);\r\n\r\n```\r\nThere are more examples at the examples folder like below.\r\n\r\n[./examples/indexTianDiTu.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexTianDiTu.html)\r\n\r\n[./examples/indexGaoDe.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexGaoDe.html)\r\n\r\n[./examples/indexGoogle.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexGoogle.html)\r\n\r\n[./examples/indexGeoq.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexGeoq.html)\r\n\r\n[./examples/indexOSM.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexOSM.html)\r\n\r\n[./examples/indexBaidu.html](http://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexBaidu.html)\r\n\r\n[./examples/indexTencent.html](https://htoooth.github.io/Leaflet.ChineseTmsProviders/examples/indexTencent.html)\r\n\r\nAbove all maps use Coordinate Reference Systems (CRS), which are EPSG:3857. \r\n\r\n\u003ca name=\"providers\"\u003e\u003c/a\u003e\r\n## Providers\r\n\r\nCurrent options suitable for tile layers are:\r\n* TianDiTu\r\n    * TianDiTu.Normal.Map\r\n    * TianDiTu.Normal.Annotion\r\n    * TianDiTu.Satellite.Map\r\n    * TianDiTu.Satellite.Annotion\r\n    * TianDiTu.Terrain.Map\r\n    * TianDiTu.Terrain.Annotion\r\n* GaoDe\r\n    * GaoDe.Normal.Map (include Annotion)\r\n    * GaoDe.Satellite.Map\r\n    * GaoDe.Satellite.Annotion\r\n* Google\r\n    * Google.Normal.Map (include Annotion)\r\n    * Google.Satellite.Map (exclude Annotion)\r\n    * Google.Satellite.Map (include Annotion)\r\n* Geoq\r\n    * Geoq.Normal.Map\r\n    * Geoq.Normal.PurplishBlue\r\n    * Geoq.Normal.Gray\r\n    * Geoq.Normal.Warm\r\n    * Geoq.Normal.Hydro\r\n* OSM\r\n    * OSM.Normal.Map\r\n* Baidu\r\n    * Baidu.Normal.Map\r\n    * Baidu.Satellite.Map (exclude Annotion)\r\n    * Baidu.Satellite.Annotion\r\n* Tencent\r\n    * Tencent.Normal.Map\r\n    * Tencent.Satellite.Map\r\n    * Tencent.Terrain.Map\r\n\r\n## Options\r\n\r\n### key\r\n\r\nIf you're using TianDiTu, please [apply the key](http://lbs.tianditu.gov.cn/) and config it in the option, like this:\r\n\r\n```js\r\nL.tileLayer.chinaProvider(\r\n    'TianDiTu.Normal.Map',\r\n    {\r\n        key: 'Your key',\r\n        maxZoom:18,\r\n        minZoom:5,\r\n    }).addTo(map);\r\n```\r\n\r\nI added a key to the source code, but this key should **only** be used for testing.\r\n\r\n## Please note\r\n\r\nIf you want to use Baidu provider，please install [Proj4Leaflet](https://github.com/kartena/Proj4Leaflet) in your project.\r\n\r\n## About\r\n\r\nThis work was inspired from \u003chttps://github.com/tontita/Leaflet.KoreanTmsProviders\u003e, \u003chttps://github.com/leaflet-extras/leaflet-providers\u003e, and \u003chttps://github.com/muyao1987/leaflet-tileLayer-baidugaode\u003e.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtoooth%2Fleaflet.chinesetmsproviders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhtoooth%2Fleaflet.chinesetmsproviders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhtoooth%2Fleaflet.chinesetmsproviders/lists"}