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 33 * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
44import ol from 'openlayers' ;
55import proj4 from "proj4" ;
6- window . proj4 = proj4 ;
7- window . Proj4js = proj4 ;
86import {
97 FetchRequest ,
108 SecurityManager ,
@@ -20,6 +18,8 @@ import {
2018} from '../core/StyleUtils' ;
2119import jsonsql from 'jsonsql' ;
2220
21+ window . proj4 = proj4 ;
22+ window . Proj4js = proj4 ;
2323ol . supermap = ol . supermap || { } ;
2424//数据转换工具
2525const transformTools = new ol . format . GeoJSON ( ) ;
@@ -156,7 +156,9 @@ export class WebMap extends ol.Observable {
156156 that . baseProjection = mapInfo . projection ;
157157
158158 // 多坐标系支持
159- if ( proj4 ) ol . proj . setProj4 ( proj4 ) ;
159+ if ( proj4 ) {
160+ ol . proj . setProj4 ( proj4 ) ;
161+ }
160162 if ( that . addProjctionFromWKT ( mapInfo . projection ) ) {
161163 mapInfo . projection = that . baseProjection = that . getEpsgInfoFromWKT ( mapInfo . projection ) ;
162164 } else {
You can’t perform that action at this time.
0 commit comments