@@ -315,7 +315,7 @@ export class WebMap extends Observable {
315
315
if ( handleResult . action === "BrowseMap" ) {
316
316
that . createSpecLayer ( mapInfo ) ;
317
317
} else if ( handleResult . action === "OpenMap" ) {
318
- that . baseProjection = handleResult . newCrs || mapInfo . projection ;
318
+ that . baseProjection = handleResult . newCrs || mapInfo . projection ;
319
319
that . webMapVersion = mapInfo . version ;
320
320
that . baseLayer = mapInfo . baseLayer ;
321
321
// that.mapParams = {
@@ -352,7 +352,7 @@ export class WebMap extends Observable {
352
352
}
353
353
354
354
/**
355
- * 处理坐标系
355
+ * 处理坐标系(底图)
356
356
* @private
357
357
* @param {string } crs 必传参数,值是webmap2中定义的坐标系,可能是 1、EGSG:xxx 2、WKT string
358
358
* @param {string } baseLayerUrl 可选参数,地图的服务地址;用于EPSG:-1 的时候,用于请求iServer提供的wkt
@@ -1068,8 +1068,8 @@ export class WebMap extends Observable {
1068
1068
} ) ;
1069
1069
options . tileGrid = tileGrid ;
1070
1070
}
1071
- //主机名相同时不添加代理
1072
- if ( layerInfo . url && ! this . isSameDomain ( layerInfo . url ) ) {
1071
+ //主机名相同时不添加代理,iportal geturlResource不支持webp代理
1072
+ if ( layerInfo . url && ! this . isSameDomain ( layerInfo . url ) && layerInfo . format !== 'webp' ) {
1073
1073
options . tileProxy = this . server + 'apps/viewer/getUrlResource.png?url=' ;
1074
1074
}
1075
1075
let source = new TileSuperMapRest ( options ) ;
@@ -1715,7 +1715,7 @@ export class WebMap extends Observable {
1715
1715
that . sendMapToUser ( len ) ;
1716
1716
that . errorCallback && that . errorCallback ( e , 'getLayerFaild' , that . map ) ;
1717
1717
} )
1718
- } else if ( layer . layerType === 'SUPERMAP_REST' ||
1718
+ } else if ( layer . layerType === 'SUPERMAP_REST' ||
1719
1719
layer . layerType === "WMS" ||
1720
1720
layer . layerType === "WMTS" ) {
1721
1721
if ( layer . layerType === "WMTS" ) {
@@ -1967,7 +1967,7 @@ export class WebMap extends Observable {
1967
1967
allDatas : {
1968
1968
features : result . result . features . features
1969
1969
} ,
1970
- fileCode : layer . projection ,
1970
+ fileCode : that . baseProjection , //因为获取restData用了动态投影,不需要再进行坐标转换。所以此处filecode和底图坐标系一致
1971
1971
featureProjection : that . baseProjection
1972
1972
} ) ;
1973
1973
that . addLayer ( layer , features , layerIndex ) ;
@@ -1977,7 +1977,7 @@ export class WebMap extends Observable {
1977
1977
that . layerAdded ++ ;
1978
1978
that . sendMapToUser ( layerLength ) ;
1979
1979
that . errorCallback && that . errorCallback ( err , 'getFeatureFaild' , that . map )
1980
- } ) ;
1980
+ } , that . baseProjection . split ( "EPSG:" ) [ 1 ] ) ;
1981
1981
}
1982
1982
1983
1983
/**
0 commit comments