Skip to content

Commit 56a7ad8

Browse files
committed
修改使用iServer的黑色地图
1 parent 2d71c5c commit 56a7ad8

33 files changed

+115
-81
lines changed

examples/leaflet/12_heatMap_NY.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,16 @@
2727
<div id="loading">纽约出租车145万上车点数据加载中...</div>
2828
<script type="text/javascript" include="leaflet.heat" src="../../dist/include-leaflet.js"></script>
2929
<script type="text/javascript">
30-
31-
var url = "https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark";
30+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
31+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
3232

3333
var map = L.map('map', {
3434
maxZoom: 20,
3535
center: [40.68, -73.92],
3636
zoom: 12,
3737
});
3838

39-
var attribution = '数据来源<a target="_blank" href="http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml">NYC Taxi(纽约出租车上车点)</a>';
39+
var attribution = '数据来源<a target="_blank" href="http://www.nyc.gov/html/tlc/html/about/trip_record_data.shtml">NYC Taxi(纽约出租车上车点)</a> Map Data <span>© <a href="http://support.supermap.com.cn/product/iServer.aspx" target="_blank">SuperMap iServer</a></span> with <span>© <a href="http://iclient.supermapol.com" target="_blank">SuperMap iClient</a></span>';
4040
L.supermap.tiledMapLayer(url, {attribution: attribution}).addTo(map);
4141
loadHeatMap();
4242

examples/leaflet/ESHeatMap.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,10 @@
342342
zoom: 4,
343343
crs: L.CRS.EPSG3857
344344
});
345-
var attr = 'Data © <a href="https://www.elastic.co/products/elasticsearch" target="_blank">ElasticSearch</a> Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a> with <span>© <a href="http://iclient.supermapol.com" target="_blank">SuperMap iClient</a></span>',
346-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
347-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
345+
var attr = 'Data © <a href="https://www.elastic.co/products/elasticsearch" target="_blank">ElasticSearch</a> Map Data <span>© <a href="http://support.supermap.com.cn/product/iServer.aspx" target="_blank">SuperMap iServer</a></span> with <span>© <a href="http://iclient.supermapol.com" target="_blank">SuperMap iClient</a></span>';
346+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
347+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
348+
L.supermap.tiledMapLayer(url,{attribution:attr}).addTo(map);
348349
}
349350

350351
initTimeControlView();

examples/leaflet/PlanesMonitor.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,10 @@
404404
zoom: 5,
405405
crs: L.CRS.EPSG3857
406406
});
407-
var attr = 'Data © <a href="https://www.elastic.co/products/elasticsearch" target="_blank">ElasticSearch</a> Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a> with <span>© <a href="http://iclient.supermapol.com" target="_blank">SuperMap iClient</a></span>',
408-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
409-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
407+
var attr = 'Data © <a href="https://www.elastic.co/products/elasticsearch" target="_blank">ElasticSearch</a> Map Data <span>© <a href="http://support.supermap.com.cn/product/iServer.aspx" target="_blank">SuperMap iServer</a></span> with <span>© <a href="http://iclient.supermapol.com" target="_blank">SuperMap iClient</a></span>';
408+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
409+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
410+
L.supermap.tiledMapLayer(url,{attribution:attr}).addTo(map);
410411
}
411412

412413
initTimeControlView();

examples/leaflet/kernelDensityJobService.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ <h4 class="modal-title">提示</h4>
3131
zoom: 12
3232
}),
3333
info = L.control({position: 'topright'});
34-
L.supermap.tiandituTileLayer("http://t{s}.tianditu.com/vec_c/wmts", {
35-
layer: "vec",
36-
tilematrixSet: "c"
37-
}).addTo(map);
34+
// L.supermap.tiandituTileLayer("http://t{s}.tianditu.com/vec_c/wmts", {
35+
// layer: "vec",
36+
// tilematrixSet: "c"
37+
// }).addTo(map);
38+
L.supermap.tiledMapLayer("http://support.supermap.com.cn:8090/iserver/services/map-world/rest/maps/World").addTo(map);
3839

3940
info.onAdd = function () {
4041
var popup = L.DomUtil.create('div');

examples/leaflet/mapVLayerCSVCar.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
center: [29.56, 106.56],
1414
zoom: 11,
1515
});
16-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
17-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
16+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
17+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1818

19-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
19+
L.supermap.tiledMapLayer(url).addTo(map);
2020
loadData();
2121

2222
//示例数据来源为百度MapV的加偏数据,iClient9未做纠偏处理

examples/leaflet/mapVLayerForceEdgeBunding.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
zoom: 4,
1414
});
1515

16-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
17-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
16+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
17+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1818

19-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
19+
L.supermap.tiledMapLayer(url).addTo(map);
2020
loadData();
2121

2222
//示例数据来源为百度MapV的加偏数据,iClient9未做纠偏处理

examples/leaflet/mapVLayerHoneycomb.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
center: [32, 109],
1313
zoom: 4,
1414
});
15-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
16-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
15+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
16+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1717

18-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
18+
L.supermap.tiledMapLayer(url).addTo(map);
1919

2020
loadData();
2121

examples/leaflet/mapVLayerPolygon.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
zoom: 8,
1515
});
1616

17-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
18-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
17+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
18+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1919

20-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
20+
L.supermap.tiledMapLayer(url).addTo(map);
2121
loadData();
2222

2323
//示例数据来源为百度MapV的加偏数据,iClient9未做纠偏处理

examples/leaflet/mapVLayerPolygonBuildings.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
zoom: 12,
1515
});
1616

17-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
18-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
17+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
18+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1919

20-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
20+
L.supermap.tiledMapLayer(url).addTo(map);
2121
loadData();
2222

2323
//示例数据来源为百度MapV的加偏数据,iClient9未做纠偏处理

examples/leaflet/mapVLayerPolylineIntensity.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
center: [36.64, 108.15],
1313
zoom: 4,
1414
});
15-
var attr = 'Map Data © <a href="https://www.supermapol.com/" target="_blank"> SuperMap Online</a>',
16-
url = 'https://www.supermapol.com/iserver/services/map_China/rest/maps/China_Dark';
15+
var host = window.isLocal ? document.location.protocol + "//" + document.location.host : "http://support.supermap.com.cn:8090";
16+
var url = host + "/iserver/services/map-china400/rest/maps/ChinaDark";
1717

18-
L.supermap.tiledMapLayer(url, {attribution: attr}).addTo(map);
18+
L.supermap.tiledMapLayer(url).addTo(map);
1919
loadData();
2020

2121
//示例数据来源为百度MapV的加偏数据,iClient9未做纠偏处理

0 commit comments

Comments
 (0)