Skip to content

Commit fcd1b35

Browse files
committed
修改openlayers对接tianditu
1 parent 69abb01 commit fcd1b35

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

dist/iclient9-openlayers.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,7 +2817,6 @@
28172817
html: ' with <a href="http://icltest.supermapol.com/">SuperMap iClient</a>'
28182818
});
28192819

2820-
var crossOrigin = options.crossOrigin || 'anonymous';
28212820
if (!options.url && !options.urls) {
28222821
options.url = "http://t{0-7}.tianditu.com/img_w/wmts"
28232822
}
@@ -2831,7 +2830,7 @@
28312830
style: options.style || 'default',
28322831
attributions: attributions,
28332832
cacheSize: options.cacheSize,
2834-
crossOrigin: crossOrigin,
2833+
crossOrigin: options.crossOrigin,
28352834
opaque: options.opaque || true,
28362835
maxZoom: options.maxZoom || 19,
28372836
reprojectionErrorThreshold: options.reprojectionErrorThreshold,

examples/openlayers/config.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@ var exampleConfig = {
240240
name: "地图",
241241
content: [{
242242
name: "举办过奥运会的城市",
243-
thumbnail: "ol_iPortalWebmap.png",
244-
fileName: "iPortalWebmap"
243+
thumbnail: "ol_iPortalWebMap.png",
244+
fileName: "iportalWebMap"
245245
}]
246246
}
247247
}
@@ -253,8 +253,8 @@ var exampleConfig = {
253253
name: "地图",
254254
content: [{
255255
name: "我的大学路线图",
256-
thumbnail: "ol_onlineWebmap.png",
257-
fileName: "onlineWebmap"
256+
thumbnail: "ol_onlineWebMap.png",
257+
fileName: "onlineWebMap"
258258
}]
259259
}
260260
}

src/openlayers/mapping/Tianditu.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ ol.source.Tianditu = function (opt_options) {
44
html: ' with <a href="http://icltest.supermapol.com/">SuperMap iClient</a>'
55
});
66

7-
var crossOrigin = options.crossOrigin || 'anonymous';
87
if (!options.url && !options.urls) {
98
options.url = "http://t{0-7}.tianditu.com/img_w/wmts"
109
}
@@ -18,7 +17,7 @@ ol.source.Tianditu = function (opt_options) {
1817
style: options.style || 'default',
1918
attributions: attributions,
2019
cacheSize: options.cacheSize,
21-
crossOrigin: crossOrigin,
20+
crossOrigin: options.crossOrigin,
2221
opaque: options.opaque || true,
2322
maxZoom: options.maxZoom || 19,
2423
reprojectionErrorThreshold: options.reprojectionErrorThreshold,

0 commit comments

Comments
 (0)