|
@@ -1,161 +1,466 @@
|
|
|
if (L.Proj) {
|
|
|
- L.CRS.Baidu = new L.Proj.CRS('EPSG:900913', '+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs', {
|
|
|
- resolutions: function () {
|
|
|
- var level = 19
|
|
|
- var res = [];
|
|
|
- res[0] = Math.pow(2, 18);
|
|
|
- for (var i = 1; i < level; i++) {
|
|
|
- res[i] = Math.pow(2, (18 - i))
|
|
|
- }
|
|
|
- return res;
|
|
|
- }(),
|
|
|
- origin: [0, 0],
|
|
|
- bounds: L.bounds([20037508.342789244, 0], [0, 20037508.342789244])
|
|
|
- });
|
|
|
+ L.CRS.Baidu = new L.Proj.CRS('EPSG:900913', '+proj=merc +a=6378206 +b=6356584.314245179 +lat_ts=0.0 +lon_0=0.0 +x_0=0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs', {
|
|
|
+ resolutions: function () {
|
|
|
+ var level = 19
|
|
|
+ var res = [];
|
|
|
+ res[0] = Math.pow(2, 18);
|
|
|
+ for (var i = 1; i < level; i++) {
|
|
|
+ res[i] = Math.pow(2, (18 - i))
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+ }(),
|
|
|
+ origin: [0, 0],
|
|
|
+ bounds: L.bounds([20037508.342789244, 0], [0, 20037508.342789244])
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
L.TileLayer.ChinaProvider = L.TileLayer.extend({
|
|
|
|
|
|
- initialize: function(type, options) { // (type, Object)
|
|
|
- var providers = L.TileLayer.ChinaProvider.providers;
|
|
|
+ initialize: function (type, options) { // (type, Object)
|
|
|
+ var providers = L.TileLayer.ChinaProvider.providers;
|
|
|
|
|
|
- options = options || {}
|
|
|
+ options = options || {}
|
|
|
|
|
|
- var parts = type.split('.');
|
|
|
+ var parts = type.split('.');
|
|
|
|
|
|
- var providerName = parts[0];
|
|
|
- var mapName = parts[1];
|
|
|
- var mapType = parts[2];
|
|
|
+ var providerName = parts[0];
|
|
|
+ var mapName = parts[1];
|
|
|
+ var mapType = parts[2];
|
|
|
|
|
|
- var url = providers[providerName][mapName][mapType];
|
|
|
- options.subdomains = providers[providerName].Subdomains;
|
|
|
- options.key = options.key || providers[providerName].key;
|
|
|
+ var url = providers[providerName][mapName][mapType];
|
|
|
+ options.subdomains = providers[providerName].Subdomains;
|
|
|
+ options.key = options.key || providers[providerName].key;
|
|
|
|
|
|
- if ('tms' in providers[providerName]) {
|
|
|
- options.tms = providers[providerName]['tms']
|
|
|
- }
|
|
|
+ if ('tms' in providers[providerName]) {
|
|
|
+ options.tms = providers[providerName]['tms']
|
|
|
+ }
|
|
|
|
|
|
- L.TileLayer.prototype.initialize.call(this, url, options);
|
|
|
- },
|
|
|
+ L.TileLayer.prototype.initialize.call(this, url, options);
|
|
|
+ },
|
|
|
|
|
|
- getTileUrl: function (coords) {
|
|
|
- var data = {
|
|
|
- s: this._getSubdomain(coords),
|
|
|
- x: coords.x,
|
|
|
- y: coords.y,
|
|
|
- z: this._getZoomForUrl(),
|
|
|
- };
|
|
|
- if (this._map && !this._map.options.crs.infinite) {
|
|
|
- var invertedY = this._globalTileRange.max.y - coords.y;
|
|
|
- if (this.options.tms) {
|
|
|
- data['y'] = invertedY;
|
|
|
- }
|
|
|
- data['-y'] = invertedY;
|
|
|
- }
|
|
|
+ getTileUrl: function (coords) {
|
|
|
+ var data = {
|
|
|
+ s: this._getSubdomain(coords),
|
|
|
+ x: coords.x,
|
|
|
+ y: coords.y,
|
|
|
+ z: this._getZoomForUrl(),
|
|
|
+ };
|
|
|
+ if (this._map && !this._map.options.crs.infinite) {
|
|
|
+ var invertedY = this._globalTileRange.max.y - coords.y;
|
|
|
+ if (this.options.tms) {
|
|
|
+ data['y'] = invertedY;
|
|
|
+ }
|
|
|
+ data['-y'] = invertedY;
|
|
|
+ }
|
|
|
|
|
|
- data.sx = data.x >> 4
|
|
|
- data.sy = (( 1 << data.z) - data.y) >> 4
|
|
|
+ data.sx = data.x >> 4
|
|
|
+ data.sy = ((1 << data.z) - data.y) >> 4
|
|
|
|
|
|
- return L.Util.template(this._url, L.Util.extend(data, this.options));
|
|
|
-},
|
|
|
+ return L.Util.template(this._url, L.Util.extend(data, this.options));
|
|
|
+ },
|
|
|
});
|
|
|
+const VITE_VIBE = import.meta.env.VITE_VIBE;
|
|
|
+if (VITE_VIBE == 'jiangmeng') {
|
|
|
+ L.TileLayer.ChinaProvider.providers = {
|
|
|
+ TianDiTu: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/tiandi/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Annotion: "http://{s}.map.jms.gd/tile/tiandi_cva/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Ibo: "http://{s}.map.jms.gd/tile/tiandi_ibo/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Mycva: "http://{s}.map.jms.gd/tile/tdt/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/tiandi_wx/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Terrain: {
|
|
|
+ Map: "http://a.map.jms.gd/tile/tiandi_ter/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ GaoDe: {
|
|
|
+ Normal: {
|
|
|
+ Map: 'http://{s}.map.jms.gd/tile/shiliang/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ XiangTu: 'http://{s}.map.jms.gd/tile/gd_xiangtu/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ XiangTuGray: 'http://{s}.map.jms.gd/tile/gd_xiangtu_gray/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ WuWenZi: 'http://{s}.map.jms.gd/tile/gd_wuwenzi/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ LuWang: 'http://{s}.map.jms.gd/tile/luwang/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ DiBiao: 'http://{s}.map.jms.gd/tile/gd_dibiao/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ Test: "http://{s}.map.jms.gd/tile/test/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: 'http://{s}.map.jms.gd/tile/weixing/{z}/{x}/{y}.png?apikey={key}'
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Pengjiang: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/pengjiang/{z}/{x}/{y}.png?apikey={key}"
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+ Taishan: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/taishan/{z}/{x}/{y}.png?apikey={key}"
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Test: {
|
|
|
+ Normal: {
|
|
|
+ Test: "http://f.map.jms.gd/tile/test/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Test1: "http://f.map.jms.gd/tile/test1/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Guangzhou: {
|
|
|
+ Normal: {
|
|
|
+ Hdpi: "http://{s}.map.jms.gd/tile/gz_hdpi/{z}/{x}/{y}.png?apikey={key}"
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Google: {
|
|
|
+ Normal: {
|
|
|
+ Map: "",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/google_s/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ GoogleCn: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/google/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Terrain: "http://{s}.map.jms.gd/tile/google_dx/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Annotion: "http://{s}.map.jms.gd/tile/google_h/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Ter: "http://{s}.map.jms.gd/tile/google_t/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/google_s/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Annotion: "http://{s}.map.jms.gd/tile/google_wx/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Tengxun: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/tengxun/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map9: "http://{s}.map.jms.gd/tile/tengxun_9/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map8: "http://{s}.map.jms.gd/tile/tengxun_8/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map4: "http://f.map.jms.gd/tile/tengxun_4/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map3: "http://{s}.map.jms.gd/tile/tengxun_3/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map2: "http://{s}.map.jms.gd/tile/tengxun_2/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map1: "http://{s}.map.jms.gd/tile/tengxun_1/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/tengxun_wx/{z}/{x}/{y}.png?apikey={key}"
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Carto: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/carto_label/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Light: "http://{s}.map.jms.gd/tile/railmap/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Dark: "http://{s}.map.jms.gd/tile/carto_dark/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+ Thunderforest: {
|
|
|
+ Normal: {
|
|
|
+ Opencyclemap: "http://{s}.map.jms.gd/tile/opencyclemap/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Transport: "http://{s}.map.jms.gd/tile/transport/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Landscape: "http://{s}.map.jms.gd/tile/landscape/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Mobile: "http://{s}.map.jms.gd/tile/mobile-atlas/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Pioneer: "http://{s}.map.jms.gd/tile/pioneer/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Neighbourhood: "http://{s}.map.jms.gd/tile/neighbourhood/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Outdoors: "http://{s}.map.jms.gd/tile/outdoors/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Atlas: "http://{s}.map.jms.gd/tile/atlas/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ TransportDark: "http://{s}.map.jms.gd/tile/transport-dark/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Spinal: "http://{s}.map.jms.gd/tile/spinal-map/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ OSM: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/osm/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Topo: "http://{s}.map.jms.gd/tile/osm_topo/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Openstreetmap: "http://{s}.map.jms.gd/tile/openstreetmap/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ winter: "http://{s}.map.jms.gd/tile/osm_winter/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ summer: "http://{s}.map.jms.gd/tile/osm_summer/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ cycling: "http://{s}.map.jms.gd/tile/osm_cycling/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Opentopomap: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/opentopomap/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Baidu: {
|
|
|
+ Normal: {
|
|
|
+ Map: 'http://{s}.map.jms.gd/tile/baidu/{z}/{x}/{y}.png?apikey={key}'
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: 'http://{s}.map.jms.gd/tile/baidu_wx/{z}/{x}/{y}.png?apikey={key}',
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118",
|
|
|
+ tms: true
|
|
|
+ },
|
|
|
+
|
|
|
+ Openrailway: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/openrailway/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Maxspeed: "http://{s}.map.jms.gd/tile/openrailway_maxspeed/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Elec: "http://{s}.map.jms.gd/tile/openrailway_elec/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Stadia: {
|
|
|
+ Normal: {
|
|
|
+ Alidade_smooth: "http://{s}.map.jms.gd/tile/alidade_smooth/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Watercolor: "http://{s}.map.jms.gd/tile/stamen_watercolor/{z}/{x}/{y}.jpg?apikey={key}",
|
|
|
+ Terrain: "http://{s}.map.jms.gd/tile/stamen_terrain/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Toner: "http://{s}.map.jms.gd/tile/stamen_toner/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ ArcgisCn: {
|
|
|
+ Normal: {
|
|
|
+ Community: "http://{s}.map.jms.gd/tile/arcgis_comm/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Gray: "http://{s}.map.jms.gd/tile/arcgis_gray/{z}/{x}/{y}.jpg?apikey={key}",
|
|
|
+ Blue: "http://{s}.map.jms.gd/tile/arcgis_blue/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Warm: "http://{s}.map.jms.gd/tile/arcgis_warm/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Arcgis: {
|
|
|
+ Normal: {
|
|
|
+ Street: "http://{s}.map.jms.gd/tile/arcgis_world_street/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Hillshade: "http://{s}.map.jms.gd/tile/arcgis_world_hillshade/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/arcgis_world_imagery/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Jl1: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/jl1_2022/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map2023: "http://{s}.map.jms.gd/tile/jl1_2023/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Map2024: "http://{s}.map.jms.gd/tile/jl1_2024/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Geovis: {
|
|
|
+ Normal: {
|
|
|
+ Base: "http://{s}.map.jms.gd/tile/geovis_base/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Stamen: {
|
|
|
+ Terrain: {
|
|
|
+ Lines: "http://{s}.map.jms.gd/tile/stamen_terrain_lines/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Toner: {
|
|
|
+ Lines: "http://{s}.map.jms.gd/tile/stamen_toner_lines/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ BingCn: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/bing/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Dark: "http://{s}.map.jms.gd/tile/bing_dark/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ Cf: "http://{s}.map.jms.gd/tile/bing_cf/{z}/{x}/{y}.png?apikey={key}", //实时路况
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Bing: {
|
|
|
+ Satellite: {
|
|
|
+ Map: "http://{s}.map.jms.gd/tile/bing_aerial/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Jiangmen: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://68.196.3.198/map/mapimg/tile/{z}/{x}/{y}?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Maptiler: {
|
|
|
+ Normal: {
|
|
|
+ basic: "http://{s}.map.jms.gd/tile/maptiler_basic/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ backdrop: "http://{s}.map.jms.gd/tile/maptiler_backdrop/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ streets: "http://{s}.map.jms.gd/tile/maptiler_streets/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ winter: "http://{s}.map.jms.gd/tile/maptiler_winter/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ ocean: "http://{s}.map.jms.gd/tile/maptiler_ocean/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ toner: "http://{s}.map.jms.gd/tile/maptiler_toner/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ topo: "http://{s}.map.jms.gd/tile/maptiler_topo/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ dataviz: "http://{s}.map.jms.gd/tile/maptiler_dataviz/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ mapbox: {
|
|
|
+ Normal: {
|
|
|
+ mapbox01: "http://{s}.map.jms.gd/tile/mapbox01/{z}/{x}/{y}.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+
|
|
|
+ Nothing: {
|
|
|
+ Normal: {
|
|
|
+ Map: "http://map.jms.gd/static/img/512.png?apikey={key}",
|
|
|
+ },
|
|
|
+ Subdomains: ["a", "b", "c", "d"],
|
|
|
+ key: "jm20240118"
|
|
|
+ },
|
|
|
+ };
|
|
|
+} else {
|
|
|
+
|
|
|
+ L.TileLayer.ChinaProvider.providers = {
|
|
|
+ TianDiTu: {
|
|
|
+ Normal: {
|
|
|
+ Map: "//t{s}.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
+ Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "//t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
+ Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
+ },
|
|
|
+ Terrain: {
|
|
|
+ Map: "//t{s}.tianditu.gov.cn/DataServer?T=ter_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
+ Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cta_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
+ },
|
|
|
+ Subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
|
|
|
+ key: "174705aebfe31b79b3587279e211cb9a"
|
|
|
+ },
|
|
|
+
|
|
|
+ GaoDe: {
|
|
|
+ Normal: {
|
|
|
+ Map: '//webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}'
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: '//webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
|
|
+ Annotion: '//webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}'
|
|
|
+ },
|
|
|
+ Subdomains: ["1", "2", "3", "4"]
|
|
|
+ },
|
|
|
+
|
|
|
+ Google: {
|
|
|
+ Normal: {
|
|
|
+ Map: "//www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={x}&y={y}&z={z}"
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "//www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}",
|
|
|
+ Annotion: "//www.google.cn/maps/vt?lyrs=y@189&gl=cn&x={x}&y={y}&z={z}"
|
|
|
+ },
|
|
|
+ Subdomains: []
|
|
|
+ },
|
|
|
+
|
|
|
+ Geoq: {
|
|
|
+ Normal: {
|
|
|
+ Map: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
|
|
|
+ PurplishBlue: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
|
|
|
+ Gray: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",
|
|
|
+ Warm: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}",
|
|
|
+ },
|
|
|
+ Theme: {
|
|
|
+ Hydro: "//thematic.geoq.cn/arcgis/rest/services/ThematicMaps/WorldHydroMap/MapServer/tile/{z}/{y}/{x}"
|
|
|
+ },
|
|
|
+ Subdomains: []
|
|
|
+ },
|
|
|
+
|
|
|
+ OSM: {
|
|
|
+ Normal: {
|
|
|
+ Map: "//{s}.tile.osm.org/{z}/{x}/{y}.png",
|
|
|
+ },
|
|
|
+ Subdomains: ['a', 'b', 'c']
|
|
|
+ },
|
|
|
+
|
|
|
+ Baidu: {
|
|
|
+ Normal: {
|
|
|
+ Map: '//online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1'
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: '//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46',
|
|
|
+ Annotion: '//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020'
|
|
|
+ },
|
|
|
+ Subdomains: '0123456789',
|
|
|
+ tms: true
|
|
|
+ },
|
|
|
+
|
|
|
+ Tencent: {
|
|
|
+ Normal: {
|
|
|
+ Map: "//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={-y}&type=vector&styleid=3",
|
|
|
+ },
|
|
|
+ Satellite: {
|
|
|
+ Map: "//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg",
|
|
|
+ },
|
|
|
+ Terrain: {
|
|
|
+ Map: "//p{s}.map.gtimg.com/demTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg"
|
|
|
+ },
|
|
|
+ Subdomains: '0123',
|
|
|
+ }
|
|
|
|
|
|
-L.TileLayer.ChinaProvider.providers = {
|
|
|
- TianDiTu: {
|
|
|
- Normal: {
|
|
|
- Map: "//t{s}.tianditu.gov.cn/DataServer?T=vec_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
- Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cva_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
- },
|
|
|
- Satellite: {
|
|
|
- Map: "//t{s}.tianditu.gov.cn/DataServer?T=img_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
- Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cia_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
- },
|
|
|
- Terrain: {
|
|
|
- Map: "//t{s}.tianditu.gov.cn/DataServer?T=ter_w&X={x}&Y={y}&L={z}&tk={key}",
|
|
|
- Annotion: "//t{s}.tianditu.gov.cn/DataServer?T=cta_w&X={x}&Y={y}&L={z}&tk={key}"
|
|
|
- },
|
|
|
- Subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
|
|
|
- key: "174705aebfe31b79b3587279e211cb9a"
|
|
|
- },
|
|
|
-
|
|
|
- GaoDe: {
|
|
|
- Normal: {
|
|
|
- Map: '//webrd0{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}'
|
|
|
- },
|
|
|
- Satellite: {
|
|
|
- Map: '//webst0{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}',
|
|
|
- Annotion: '//webst0{s}.is.autonavi.com/appmaptile?style=8&x={x}&y={y}&z={z}'
|
|
|
- },
|
|
|
- Subdomains: ["1", "2", "3", "4"]
|
|
|
- },
|
|
|
-
|
|
|
- Google: {
|
|
|
- Normal: {
|
|
|
- Map: "//www.google.cn/maps/vt?lyrs=m@189&gl=cn&x={x}&y={y}&z={z}"
|
|
|
- },
|
|
|
- Satellite: {
|
|
|
- Map: "//www.google.cn/maps/vt?lyrs=s@189&gl=cn&x={x}&y={y}&z={z}",
|
|
|
- Annotion: "//www.google.cn/maps/vt?lyrs=y@189&gl=cn&x={x}&y={y}&z={z}"
|
|
|
- },
|
|
|
- Subdomains: []
|
|
|
- },
|
|
|
-
|
|
|
- Geoq: {
|
|
|
- Normal: {
|
|
|
- Map: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer/tile/{z}/{y}/{x}",
|
|
|
- PurplishBlue: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetPurplishBlue/MapServer/tile/{z}/{y}/{x}",
|
|
|
- Gray: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetGray/MapServer/tile/{z}/{y}/{x}",
|
|
|
- Warm: "//map.geoq.cn/ArcGIS/rest/services/ChinaOnlineStreetWarm/MapServer/tile/{z}/{y}/{x}",
|
|
|
- },
|
|
|
- Theme: {
|
|
|
- Hydro: "//thematic.geoq.cn/arcgis/rest/services/ThematicMaps/WorldHydroMap/MapServer/tile/{z}/{y}/{x}"
|
|
|
- },
|
|
|
- Subdomains: []
|
|
|
- },
|
|
|
-
|
|
|
- OSM: {
|
|
|
- Normal: {
|
|
|
- Map: "//{s}.tile.osm.org/{z}/{x}/{y}.png",
|
|
|
- },
|
|
|
- Subdomains: ['a', 'b', 'c']
|
|
|
- },
|
|
|
-
|
|
|
- Baidu: {
|
|
|
- Normal: {
|
|
|
- Map: '//online{s}.map.bdimg.com/onlinelabel/?qt=tile&x={x}&y={y}&z={z}&styles=pl&scaler=1&p=1'
|
|
|
- },
|
|
|
- Satellite: {
|
|
|
- Map: '//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46',
|
|
|
- Annotion: '//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020'
|
|
|
- },
|
|
|
- Subdomains: '0123456789',
|
|
|
- tms: true
|
|
|
- },
|
|
|
-
|
|
|
- Tencent: {
|
|
|
- Normal: {
|
|
|
- Map: "//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={-y}&type=vector&styleid=3",
|
|
|
- },
|
|
|
- Satellite: {
|
|
|
- Map: "//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg",
|
|
|
- },
|
|
|
- Terrain: {
|
|
|
- Map: "//p{s}.map.gtimg.com/demTiles/{z}/{sx}/{sy}/{x}_{-y}.jpg"
|
|
|
- },
|
|
|
- Subdomains: '0123',
|
|
|
- }
|
|
|
-
|
|
|
-};
|
|
|
+ };
|
|
|
+}
|
|
|
|
|
|
-L.tileLayer.chinaProvider = function(type, options) {
|
|
|
- return new L.TileLayer.ChinaProvider(type, options);
|
|
|
+L.tileLayer.chinaProvider = function (type, options) {
|
|
|
+ return new L.TileLayer.ChinaProvider(type, options);
|
|
|
};
|
|
|
|
|
|
//坐标转换
|
|
|
L.CoordConver = function () {
|
|
|
|
|
|
/**百度转84*/
|
|
|
- this.bd09_To_gps84 = function(lng, lat) {
|
|
|
+ this.bd09_To_gps84 = function (lng, lat) {
|
|
|
var gcj02 = this.bd09_To_gcj02(lng, lat);
|
|
|
var map84 = this.gcj02_To_gps84(gcj02.lng, gcj02.lat);
|
|
|
return map84;
|