@@ -315,7 +315,7 @@ export class WebMap extends Observable {
315315 if ( handleResult . action === "BrowseMap" ) {
316316 that . createSpecLayer ( mapInfo ) ;
317317 } else if ( handleResult . action === "OpenMap" ) {
318- that . baseProjection = handleResult . newCrs || mapInfo . projection ;
318+ that . baseProjection = handleResult . newCrs || mapInfo . projection ;
319319 that . webMapVersion = mapInfo . version ;
320320 that . baseLayer = mapInfo . baseLayer ;
321321 // that.mapParams = {
@@ -352,7 +352,7 @@ export class WebMap extends Observable {
352352 }
353353
354354 /**
355- * 处理坐标系
355+ * 处理坐标系(底图)
356356 * @private
357357 * @param {string } crs 必传参数,值是webmap2中定义的坐标系,可能是 1、EGSG:xxx 2、WKT string
358358 * @param {string } baseLayerUrl 可选参数,地图的服务地址;用于EPSG:-1 的时候,用于请求iServer提供的wkt
@@ -1068,8 +1068,8 @@ export class WebMap extends Observable {
10681068 } ) ;
10691069 options . tileGrid = tileGrid ;
10701070 }
1071- //主机名相同时不添加代理
1072- if ( layerInfo . url && ! this . isSameDomain ( layerInfo . url ) ) {
1071+ //主机名相同时不添加代理,iportal geturlResource不支持webp代理
1072+ if ( layerInfo . url && ! this . isSameDomain ( layerInfo . url ) && layerInfo . format !== 'webp' ) {
10731073 options . tileProxy = this . server + 'apps/viewer/getUrlResource.png?url=' ;
10741074 }
10751075 let source = new TileSuperMapRest ( options ) ;
@@ -1715,7 +1715,7 @@ export class WebMap extends Observable {
17151715 that . sendMapToUser ( len ) ;
17161716 that . errorCallback && that . errorCallback ( e , 'getLayerFaild' , that . map ) ;
17171717 } )
1718- } else if ( layer . layerType === 'SUPERMAP_REST' ||
1718+ } else if ( layer . layerType === 'SUPERMAP_REST' ||
17191719 layer . layerType === "WMS" ||
17201720 layer . layerType === "WMTS" ) {
17211721 if ( layer . layerType === "WMTS" ) {
@@ -1967,7 +1967,7 @@ export class WebMap extends Observable {
19671967 allDatas : {
19681968 features : result . result . features . features
19691969 } ,
1970- fileCode : layer . projection ,
1970+ fileCode : that . baseProjection , //因为获取restData用了动态投影,不需要再进行坐标转换。所以此处filecode和底图坐标系一致
19711971 featureProjection : that . baseProjection
19721972 } ) ;
19731973 that . addLayer ( layer , features , layerIndex ) ;
@@ -1977,7 +1977,7 @@ export class WebMap extends Observable {
19771977 that . layerAdded ++ ;
19781978 that . sendMapToUser ( layerLength ) ;
19791979 that . errorCallback && that . errorCallback ( err , 'getFeatureFaild' , that . map )
1980- } ) ;
1980+ } , that . baseProjection . split ( "EPSG:" ) [ 1 ] ) ;
19811981 }
19821982
19831983 /**
0 commit comments