Skip to content

Commit f99b3f0

Browse files
Merge branch 'v11.2.0' of https://github.com/SuperMap/iClient-JavaScript into v11.2.0
2 parents 277a86b + b179eb8 commit f99b3f0

File tree

23 files changed

+778
-54
lines changed

23 files changed

+778
-54
lines changed

dist/classic/include-classic.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
}
158158

159159
load({
160-
libsurl: '../../libs',
160+
libsurl: 'https://iclient.supermap.io/web/libs',
161161
disturl: '../../dist'
162162
});
163163
window.isLocal = false;

dist/leaflet/include-leaflet.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
}
178178

179179
load({
180-
libsurl: '../../libs',
180+
libsurl: 'https://iclient.supermap.io/web/libs',
181181
disturl: '../../dist'
182182
});
183183
window.isLocal = false;

dist/mapboxgl/include-mapboxgl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
}
220220

221221
load({
222-
libsurl: '../../libs',
222+
libsurl: 'https://iclient.supermap.io/web/libs',
223223
disturl: '../../dist'
224224
});
225225
window.isLocal = false;

dist/maplibregl/include-maplibregl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
}
198198

199199
load({
200-
libsurl: '../../libs',
200+
libsurl: 'https://iclient.supermap.io/web/libs',
201201
disturl: '../../dist'
202202
});
203203
window.isLocal = false;

dist/ol/include-ol.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
inputScript(libsurl + '/openlayers/ol3-echarts/1.3.6/ol3Echarts.min.js');
9090
}
9191
if (inArray(includes, 'ol-mapbox-style')) {
92-
inputScript(libsurl + '/openlayers/plugins/ol-mapbox-style/2.11.2-5/olms.js');
92+
inputScript(libsurl + '/openlayers/plugins/ol-mapbox-style/2.11.2-6/olms.js');
9393
}
9494
if (inArray(includes, 'deck')) {
9595
inputScript(libsurl + '/deck.gl/5.1.3/deck.gl.min.js');
@@ -144,7 +144,7 @@
144144
}
145145

146146
load({
147-
libsurl: '../../libs',
147+
libsurl: 'https://iclient.supermap.io/web/libs',
148148
disturl: '../../dist'
149149
});
150150
window.isLocal = false;

dist/openlayers/include-openlayers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
inputScript(libsurl + '/openlayers/ol3-echarts/1.3.6/ol3Echarts.min.js');
9090
}
9191
if (inArray(includes, 'ol-mapbox-style')) {
92-
inputScript(libsurl + '/openlayers/plugins/ol-mapbox-style/2.11.2-5/olms.js');
92+
inputScript(libsurl + '/openlayers/plugins/ol-mapbox-style/2.11.2-6/olms.js');
9393
}
9494
if (inArray(includes, 'deck')) {
9595
inputScript(libsurl + '/deck.gl/5.1.3/deck.gl.min.js');
@@ -138,7 +138,7 @@
138138
}
139139

140140
load({
141-
libsurl: '../../libs',
141+
libsurl: 'https://iclient.supermap.io/web/libs',
142142
disturl: '../../dist'
143143
});
144144
window.isLocal = false;

examples/component/components_attributes_vue.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
width: 100%;
2020
height: 100%;
2121
}
22+
.sm-component-table-fixed {
23+
width: 100% !important;
24+
}
2225
</style>
2326
</head>
2427

@@ -71,7 +74,7 @@
7174
],
7275
table: {
7376
pagination: {
74-
pageSize: 10
77+
pageSize: 6
7578
}
7679
}
7780
};

examples/leaflet/01_chartService.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ <h5 class='panel-title text-center'>
486486
function clickHandler(event) {
487487
var coordinate = event.latlng;
488488
var pixelCoor = event.layerPoint;
489-
var b1 = map.containerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
490-
var b2 = map.containerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
489+
var b1 = map.layerPointToLatLng([pixelCoor.x-15,pixelCoor.y+15]);
490+
var b2 = map.layerPointToLatLng([pixelCoor.x+15,pixelCoor.y-15]);
491491
// 添加点要素
492492
pointResultLayer && map.removeLayer(pointResultLayer);
493493
pointResultLayer = L.circleMarker(coordinate,{radius:5});

src/mapboxgl/mapping/InitMap.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import mapboxgl from 'mapbox-gl';
22
import { MapService } from '../services/MapService';
33
import { FetchRequest } from '@supermapgis/iclient-common/util/FetchRequest';
44
import { InitMapServiceBase, isPlaneProjection, getZoom, getTileset, getTileFormat } from '@supermapgis/iclient-common/iServer/InitMapServiceBase';
5+
import { Util } from '@supermapgis/iclient-common/commontypes/Util';
56
import proj4 from 'proj4';
67

78
/**
@@ -137,7 +138,7 @@ async function getVectorTileCRSExtent(vectorStyleUrl, restMapUrl) {
137138
if (vectorStyleData.metadata && vectorStyleData.metadata.indexbounds) {
138139
return { extent: vectorStyleData.metadata.indexbounds };
139140
}
140-
const vectorExtentDataRes = await FetchRequest.get(`${restMapUrl}/prjCoordSys/projection/extent.json`);
141+
const vectorExtentDataRes = await FetchRequest.get(Util.urlPathAppend(restMapUrl, 'prjCoordSys/projection/extent.json'));
141142
const vectorExtentData = await vectorExtentDataRes.json();
142143
return { extent: vectorExtentData, center: vectorStyleData.center };
143144
} catch (error) {
@@ -176,7 +177,7 @@ async function createMapOptions(url, resetServiceInfo, options) {
176177
let extent = bounds;
177178
let tileUrl =
178179
sourceType === 'vector-tile'
179-
? url + '/tileFeature/vectorstyles.json?type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY'
180+
? Util.urlAppend(Util.urlPathAppend(url, 'tileFeature/vectorstyles.json'), 'type=MapBox_GL&styleonly=true&tileURLTemplate=ZXY')
180181
: url;
181182
let nonEnhanceExtraInfo = {};
182183
let enhanceExtraInfo = {};
@@ -228,7 +229,7 @@ async function createMapOptions(url, resetServiceInfo, options) {
228229
const tileSize = 256;
229230
nonEnhanceExtraInfo.tileSize = tileSize;
230231
const transparent = mapOptions.transparent !== false;
231-
tileUrl += `/zxyTileImage.png?z={z}&x={x}&y={y}&width=${tileSize}&height=${tileSize}&transparent=${transparent}`;
232+
tileUrl = Util.urlAppend(Util.urlPathAppend(tileUrl, 'zxyTileImage.png'), `z={z}&x={x}&y={y}&width=${tileSize}&height=${tileSize}&transparent=${transparent}`);
232233
}
233234
}
234235
if (zoom === undefined) {

src/mapboxgl/mapping/utils/L7LayerUtil.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,14 @@ function vectorSourceToL7Source(source, sourceLayer, options) {
638638
sourceLayer
639639
}
640640
};
641-
if (isIportalProxyServiceUrl(result.data, options)) {
642-
Object.assign(result.parser, {
643-
requestParameters: {
644-
credentials: 'include'
645-
}
646-
});
641+
const requestParameters = options.transformRequest(result.data, 'Tile');
642+
if (requestParameters) {
643+
if (requestParameters.credentials) {
644+
result.parser.requestParameters = { credentials: requestParameters.credentials };
645+
}
646+
if (requestParameters.headers) {
647+
result.parser.requestParameters = { ...result.parser.requestParameters, headers: requestParameters.headers };
648+
}
647649
}
648650
return result;
649651
}

0 commit comments

Comments
 (0)