Skip to content

lin-123/leaflet.chinaProvider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

javascript toolkit base project

Usage

npm install -S leaflet.chinaProvider

Example

  • baidu tile layer
    import L from 'leaflet';
    import 'leaflet.chinaProvider';
    const map = L.map('map', {
      crs: L.CRS.Baidu, // if use baidu
      center: [31.59, 120.29],
      zoom: 12,
      maxZoom: 18,
      minZoom: 5
    })
    L.tileLayer.chinaProvider('Baidu.Normal.Map', { customid }).addTo(map);
  • google tile layer
    import L from 'leaflet';
    import 'leaflet.chinaProvider';
    const map = L.map('map', {
      center: [31.59, 120.29],
      zoom: 12,
      maxZoom: 18,
      minZoom: 5
    })
    L.tileLayer.chinaProvider('Google.Normal.Map').addTo(map);

alt text

Development

Envirenment

  • node v10.8.0

feature list

0.1.0

  • 拆分各个地图公司的配置,以统一出口对外输出
  • proj2leaflet 需要引入 leaflet, 怎么解决

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published