finds.dev← search

// the find

htoooth/Leaflet.ChineseTmsProviders

★ 1,080 · JavaScript · MIT · updated Jul 2022

Provider for Chinese Tms Service

A Leaflet plugin that bundles tile layer configurations for Chinese mapping services — TianDiTu, GaoDe, Baidu, Tencent, and a few others. Saves you from manually wiring up provider URLs and CRS quirks for maps targeting mainland China. Useful if you're building a web map that needs to show Chinese government or commercial basemaps.

Handles the Baidu CRS mess — Baidu uses its own scrambled coordinate system (BD-09), and the plugin at least documents and supports Proj4Leaflet for it. Covers the main providers in one place so you're not copy-pasting tile URLs from Stack Overflow. The provider string API mirrors leaflet-providers, so if you've used that before this feels familiar.

Last commit was July 2022 and several of these tile services have rotated their URLs, added stricter API key requirements, or changed access policies since then — there's a real chance some providers are broken out of the box. The Baidu layer silently requires Proj4Leaflet as an unlisted peer dependency; if you miss that, you get a confusing runtime error. No TypeScript types. The test surface is zero — just static HTML examples you open manually, so you won't know if a provider broke until your map goes blank in production.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →