项目作者: DeluxeZ

项目描述 :
GIS实现简单的天津市接警数据,前端web
高级语言:
项目地址: git://github.com/DeluxeZ/Gis-web.git
创建时间: 2020-03-29T12:16:54Z
项目社区:https://github.com/DeluxeZ/Gis-web

开源协议:Other

下载


Leaflet.ChineseTmsProviders

An extension to Leaflet that contains configurations for various Chinese tile providers.

Usage

Leaflet-ChineseTmsProviders providers are refered to with a provider.<variant>.<type> -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.

  1. //add TianDiTu Normal Map Layer to map.
  2. L.tileLayer.chinaProvider('TianDiTu.Normal.Map').addTo(map);

Example

  1. var map = L.map('map', {
  2. center: [31.59, 120.29],
  3. zoom: 12
  4. });
  5. L.tileLayer.chinaProvider('TianDiTu.Normal.Map',{maxZoom:18,minZoom:5}).addTo(map);
  6. L.tileLayer.chinaProvider('TianDiTu.Normal.Annotion',{maxZoom:18,minZoom:5}).addTo(map);

There are more examples at the examples folder like below.

  1. ./examples/indexTianDiTu.html
  2. ./examples/indexGaoDe.html
  3. ./examples/indexGoogle.html
  4. ./examples/indexGeoq.html

All maps use Coordinate Reference Systems (CRS), which are EPSG:4326. Therefore, they are compatible with other international tile providers that are based on EPSG:4326 or EPSG:900913. So they can be used with other tile providers (e.g. googlemap, OpenStreetMap, OpenWeatherMap, etc.) that are using the same CRS (i.e. EPSG:4326 or EPSG:900913).

Providers

Current options suitable for tile layers are:

  • TianDiTu
    • TianDiTu.Normal.Map
    • TianDiTu.Normal.Annotion
    • TianDiTu.Satellite.Map
    • TianDiTu.Satellite.Annotion
    • TianDiTu.Terrain.Map
    • TianDiTu.Terrain.Annotion
  • GaoDe
    • GaoDe.Normal.Map (include Annotion)
    • GaoDe.Satellite.Map
    • GaoDe.Satellite.Annotion
  • Google
    • Google.Normal.Map (include Annotion)
    • Google.Satellite.Map
  • Geoq
    • Geoq.Normal.Map
    • Geoq.Normal.Color
    • Geoq.Normal.PurplishBlue
    • Geoq.Normal.Gray
    • Geoq.Normal.Warm
    • Geoq.Normal.Cold

About

This work was inspired from https://github.com/tontita/Leaflet.KoreanTmsProviders, and https://github.com/leaflet-extras/leaflet-providers.