File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
* which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
4
4
import ol from 'openlayers' ;
5
5
import proj4 from "proj4" ;
6
- window . proj4 = proj4 ;
7
- window . Proj4js = proj4 ;
8
6
import {
9
7
FetchRequest ,
10
8
SecurityManager ,
@@ -20,6 +18,8 @@ import {
20
18
} from '../core/StyleUtils' ;
21
19
import jsonsql from 'jsonsql' ;
22
20
21
+ window . proj4 = proj4 ;
22
+ window . Proj4js = proj4 ;
23
23
ol . supermap = ol . supermap || { } ;
24
24
//数据转换工具
25
25
const transformTools = new ol . format . GeoJSON ( ) ;
@@ -156,7 +156,9 @@ export class WebMap extends ol.Observable {
156
156
that . baseProjection = mapInfo . projection ;
157
157
158
158
// 多坐标系支持
159
- if ( proj4 ) ol . proj . setProj4 ( proj4 ) ;
159
+ if ( proj4 ) {
160
+ ol . proj . setProj4 ( proj4 ) ;
161
+ }
160
162
if ( that . addProjctionFromWKT ( mapInfo . projection ) ) {
161
163
mapInfo . projection = that . baseProjection = that . getEpsgInfoFromWKT ( mapInfo . projection ) ;
162
164
} else {
You can’t perform that action at this time.
0 commit comments