Skip to content

Commit b8c11fa

Browse files
[fix]ol升级到7.5.2 review by songym
1 parent 86863fa commit b8c11fa

File tree

178 files changed

+396
-226
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

178 files changed

+396
-226
lines changed

dist/ol/include-ol.js

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@
5656
var excludes = (targetScript.getAttribute('exclude') || '').split(',');
5757
// 在线
5858
if (!inArray(includes, 'ol-debug') && !inArray(includes, '[email protected]') && !inArray(excludes, 'ol')) {
59-
inputCSS(libsurl + '/openlayers/6.14.1/ol.css');
60-
inputScript(libsurl + '/openlayers/6.14.1/ol.js');
59+
inputCSS(libsurl + '/openlayers/7.5.2/ol.min.css');
60+
inputScript(libsurl + '/openlayers/7.5.2/ol.js');
6161
}
6262
if (inArray(includes, '[email protected]')) {
6363
inputCSS(libsurl + '/openlayers/4.6.5/ol.css');
@@ -83,7 +83,10 @@
8383
inputScript(libsurl + '/proj4/2.11.0/proj4.min.js');
8484
}
8585
if (inArray(includes, 'ol3-echarts')) {
86-
inputScript(libsurl + '/openlayers/ol3-echarts/2.0.6/ol3Echarts.min.js');
86+
inputScript('../../web/libs' + '/openlayers/ol3-echarts/4.0.0/ol-echarts.js');
87+
}
88+
if (inArray(includes, '[email protected]')) {
89+
inputScript(libsurl + '/openlayers/ol3-echarts/3.0.0/ol3Echarts.min.js');
8790
}
8891
if (inArray(includes, '[email protected]')) {
8992
inputScript(libsurl + '/openlayers/ol3-echarts/1.3.6/ol3Echarts.min.js');
@@ -101,8 +104,12 @@
101104
inputScript(libsurl + '/openlayers/plugins/animatedclusterlayer/animatedclusterlayer.js');
102105
}
103106
if (inArray(includes, 'layerswitcher')) {
104-
inputCSS(libsurl + '/openlayers/plugins/ol-layerswitcher/3.8.3/ol-layerswitcher.css');
105-
inputScript(libsurl + '/openlayers/plugins/ol-layerswitcher/3.8.3/ol-layerswitcher.js');
107+
inputCSS(libsurl + '/openlayers/plugins/ol-layerswitcher/4.1.1/ol-layerswitcher.min.css');
108+
inputScript(libsurl + '/openlayers/plugins/ol-layerswitcher/4.1.1/ol-layerswitcher.min.js');
109+
}
110+
if (inArray(includes, '[email protected]')) {
111+
inputCSS(libsurl + '/openlayers/plugins/ol-layerswitcher/3.8.3/ol-layerswitcher.css');
112+
inputScript(libsurl + '/openlayers/plugins/ol-layerswitcher/3.8.3/ol-layerswitcher.js');
106113
}
107114
if (inArray(includes, 'jsonsql')) {
108115
inputScript(libsurl + '/jsonsql/0.2.5/jsonsql.min.js');

examples/js/tokengenerator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
window.exampleToken = "PisX2NS9DsMKnnNzs6lg5WzjwZqvH2zXcizVYuBG0L0MvPrnBafdbATturwemCbsdUMHvIfItEBVCAcgubl-UNDHMsJU_XJWanQN65xaOUj_xMCsSTkKn26WFWLgvKBy";
2-
window.iportalToken ="YDXLzgADk20EZ4PWXFn7FZ5gtydmT3GdaMt5HiBUNPlZBmafJjoce4KYZMFopVGL3K_P4BbT-MVuq2GJ6YfZJw.."
2+
window.iportalToken ="YDXLzgADk20EZ4PWXFn7FW-TvWJtAQGR4SQk3bXCkyhvv_7NhFJ8AEdyVk4BaYDO39bo4oLEC4bXorZ6qIJDxQ.."

examples/openlayers/01_chartService.html

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -354,14 +354,15 @@ <h5 class='panel-title text-center'>
354354
url = host + "/iserver/services/map-Chart9FU/rest/maps/Chart9Fu"
355355
map = new ol.Map({
356356
target: 'map',
357-
controls: ol.control.defaults({
358-
attributionOptions: {
359-
collapsed: false
360-
}
361-
})
362-
.extend([new ol.supermap.control.Logo({
363-
link: "https://iclient.supermap.io"
364-
})]),
357+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
358+
controls: ol.control.defaults.defaults({
359+
attributionOptions: {
360+
collapsed: false
361+
}
362+
})
363+
.extend([new ol.supermap.control.Logo({
364+
link: "https://iclient.supermap.io"
365+
})]),
365366
view: new ol.View({
366367
center: [-94.9, 29.5],
367368
zoom: 13,

examples/openlayers/01_layerService.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
var url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
6767
map = new ol.Map({
6868
target: 'map',
69-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
69+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
70+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
7071
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
7172
view: new ol.View({
7273
center: [0, 0],

examples/openlayers/01_layersLegend.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ <h5 class='panel-title text-center'>
8282
var url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-jingjin/rest/maps/京津地区土地利用现状图";
8383
map = new ol.Map({
8484
target: 'map',
85-
controls: ol.control.defaults({
85+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
86+
controls: ol.control.defaults.defaults({
8687
attributionOptions: {
8788
collapsed: false
8889
}

examples/openlayers/01_mapQueryByBounds.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [0, 0],

examples/openlayers/01_mapQueryByDistance.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [100, 0],

examples/openlayers/01_mapQueryByGeometry.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [0, 0],

examples/openlayers/01_mapQueryBySQL.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [0, 0],

examples/openlayers/01_mapQueryBySQL_FGB.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [0, 0],

examples/openlayers/01_mapService.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
6868
map = new ol.Map({
6969
target: 'map',
70-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
70+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
71+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
7172
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
7273
view: new ol.View({
7374
center: [0, 0],

examples/openlayers/01_measure_area.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
url = (window.isLocal ? window.server : "https://iserver.supermap.io") + "/iserver/services/map-world/rest/maps/World";
1717
map = new ol.Map({
1818
target: 'map',
19-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
19+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
20+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2021
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2122
view: new ol.View({
2223
center: [0, 0],

examples/openlayers/01_measure_distance.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
map = new ol.Map({
1919
target: 'map',
20-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
20+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
21+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2122
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2223
view: new ol.View({
2324
center: [0, 0],

examples/openlayers/01_tiledMapLayer3857.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// 方式一:1.调用 ol.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
2020
ol.supermap.initMap(url, {
2121
mapOptions: {
22-
controls: ol.control
23-
.defaults({ attributionOptions: { collapsed: false } })
22+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
23+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
2424
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })])
2525
}
2626
});
@@ -32,8 +32,8 @@
3232
const mapObj = serviceResult.result;
3333
map = new ol.Map({
3434
target: 'map',
35-
controls: ol.control
36-
.defaults({ attributionOptions: { collapsed: false } })
35+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
36+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
3737
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
3838
view: new ol.View(ol.supermap.viewOptionsFromMapJSON(mapObj))
3939
});

examples/openlayers/01_tiledMapLayer4326.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
// 方式一:1.调用 ol.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
2020
ol.supermap.initMap(url, {
2121
mapOptions: {
22-
controls: ol.control
23-
.defaults({ attributionOptions: { collapsed: false } })
22+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
23+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
2424
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })])
2525
}
2626
});
@@ -33,8 +33,8 @@
3333
const viewOptions = ol.supermap.viewOptionsFromMapJSON(mapObj);
3434
map = new ol.Map({
3535
target: 'map',
36-
controls: ol.control
37-
.defaults({ attributionOptions: { collapsed: false } })
36+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
37+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
3838
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
3939
view: new ol.View(viewOptions)
4040
});

examples/openlayers/01_tiledMapLayerNoProj.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
// 方式一:1.调用 ol.supermap.initMap,根据 SuperMap iServer 地图服务的地图信息,创建地图和底图
2020
ol.supermap.initMap(url, {
2121
mapOptions: {
22-
controls: ol.control
23-
.defaults({ attributionOptions: { collapsed: false } })
24-
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })])
22+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
23+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
24+
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })])
2525
}
2626
});
2727
/* 方式二:1.调用 ol.supermap.MapService,获取 SuperMap iServer 地图服务的地图信息
@@ -32,7 +32,8 @@
3232
var mapObj = serviceResult.result;
3333
var map = new ol.Map({
3434
target: 'map',
35-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
35+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
36+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
3637
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
3738
view: new ol.View(ol.supermap.viewOptionsFromMapJSON(mapObj))
3839
});

examples/openlayers/01_tiledMapLayerOverlapped.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
ol.supermap
2525
.initMap(urlWorld, {
2626
mapOptions: {
27-
controls: ol.control
28-
.defaults({ attributionOptions: { collapsed: false } })
27+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
28+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
2929
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })])
3030
},
3131
viewOptions: {
@@ -50,8 +50,8 @@
5050
const mapObj = serviceResult.result;
5151
map = new ol.Map({
5252
target: 'map',
53-
controls: ol.control
54-
.defaults({ attributionOptions: { collapsed: false } })
53+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
54+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
5555
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
5656
view: new ol.View(ol.supermap.viewOptionsFromMapJSON(mapObj))
5757
});

examples/openlayers/01_tiledmaplayer_rasterfunction.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
url = host + '/iserver/services/map-ndvi/rest/maps/hainanImage';
1515
map = new ol.Map({
1616
target: 'map',
17-
controls: ol.control
18-
.defaults({ attributionOptions: { collapsed: false } })
17+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
18+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
1919
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2020
view: new ol.View({
2121
center: [12189483.19 , 2155290.02],

examples/openlayers/02_FeatureAttachment.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ <h5 class='panel-title text-center' data-i18n="resources.text_editSingle"></h5>
137137
});
138138
map = new ol.Map({
139139
target: 'map',
140-
controls: ol.control.defaults({ attributionOptions: { collapsed: false } })
140+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
141+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
141142
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
142143
view: new ol.View({
143144
center: [0, 0],

examples/openlayers/02_attributes.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
var fieldList = [];
5050
map = new ol.Map({
5151
target: 'map',
52-
controls: ol.control
53-
.defaults({ attributionOptions: { collapsed: false } })
52+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
53+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
5454
.extend([new ol.supermap.control.Logo({ link: 'https://iclient.supermap.io' })]),
5555
view: new ol.View({
5656
center: [100, 0],

examples/openlayers/02_datasetService.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,8 @@ <h5 class='panel-title text-center' data-i18n="resources.title_DatasetInfo"></h5
127127
}));
128128
map = new ol.Map({
129129
target: 'map',
130-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
130+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
131+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
131132
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
132133
view: new ol.View({
133134
center: [0, 0],

examples/openlayers/02_datasourceService.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ <h5 class='panel-title text-center' data-i18n="resources.title_DatasourceInfo"><
123123
}));
124124
map = new ol.Map({
125125
target: 'map',
126-
controls: ol.control.defaults({ attributionOptions: { collapsed: false } })
126+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
127+
controls: ol.control.defaults.defaults({ attributionOptions: { collapsed: false } })
127128
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
128129
view: new ol.View({
129130
center: [0, 0],

examples/openlayers/02_editFeatures.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ <h5 class='panel-title text-center' data-i18n="resources.text_editSingle"></h5><
123123

124124
map = new ol.Map({
125125
target: 'map',
126-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
126+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
127+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
127128
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
128129
view: new ol.View({
129130
center: [0, 0],

examples/openlayers/02_fieldStatistics.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636

3737
map = new ol.Map({
3838
target: 'map',
39-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
39+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
40+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
4041
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
4142
view: new ol.View({
4243
center: [0, 0],

examples/openlayers/02_fieldsService.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@
6767
}));
6868
map = new ol.Map({
6969
target: 'map',
70-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
70+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
71+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
7172
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
7273
view: new ol.View({
7374
center: [0, 0],

examples/openlayers/02_getFeatureByBounds.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
1818
map = new ol.Map({
1919
target: 'map',
20-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
20+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
21+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2122
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2223
view: new ol.View({
2324
center: [-10, 15],

examples/openlayers/02_getFeatureByBuffer.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
url = (window.isLocal ? window.server : "https://iserver.supermap.io")+"/iserver/services/data-world/rest/data";
1818
map = new ol.Map({
1919
target: 'map',
20-
controls: ol.control.defaults({attributionOptions: {collapsed: false}})
20+
// ol v7版本用法为ol.control.defaults.defaults; v6版本以下用法为ol.control.defaults
21+
controls: ol.control.defaults.defaults({attributionOptions: {collapsed: false}})
2122
.extend([new ol.supermap.control.Logo({ link: "https://iclient.supermap.io" })]),
2223
view: new ol.View({
2324
center: [-10, 15],

0 commit comments

Comments
 (0)