8
8
* @license MPL-2.0
9
9
*/
10
10
11
- import { extend } from 'ol/extent.js' ;
12
-
13
- import WFS from '../modules/WFS.js' ;
14
- import WMS from '../modules/WMS.js' ;
15
- import { Utils } from '../modules/Utils.js' ;
16
-
17
11
window . lizMap = function ( ) {
18
12
/**
19
13
* PRIVATE Property: config
@@ -2082,7 +2076,7 @@ window.lizMap = function() {
2082
2076
// Download file
2083
2077
document . querySelectorAll ( '.exportLayer' ) . forEach ( el => el . disabled = true ) ;
2084
2078
mAddMessage ( lizDict [ 'layer.export.started' ] , 'info' , true ) . addClass ( 'export-in-progress' ) ;
2085
- Utils . downloadFile ( getFeatureUrlData [ 'url' ] , getFeatureUrlData [ 'options' ] , ( ) => {
2079
+ lizMap . mainLizmap . utils . downloadFile ( getFeatureUrlData [ 'url' ] , getFeatureUrlData [ 'options' ] , ( ) => {
2086
2080
document . querySelectorAll ( '.exportLayer' ) . forEach ( el => el . disabled = false ) ;
2087
2081
document . querySelector ( '#message .export-in-progress button' ) . click ( ) ;
2088
2082
} ) ;
@@ -2301,7 +2295,7 @@ window.lizMap = function() {
2301
2295
types : aConfig [ 'types' ]
2302
2296
} ;
2303
2297
2304
- const wfs = new WFS ( ) ;
2298
+ const wfs = new lizMap . mainLizmap . wfs ( ) ;
2305
2299
wfs . getFeature ( getFeatureUrlData [ 'options' ] ) . then ( data => {
2306
2300
aConfig [ 'featureCrs' ] = 'EPSG:4326' ;
2307
2301
@@ -2522,7 +2516,7 @@ window.lizMap = function() {
2522
2516
2523
2517
// Query the server
2524
2518
$ . post ( globalThis [ 'lizUrls' ] . service , wmsOptions , function ( data ) {
2525
- aCallback ( Utils . sanitizeGFIContent ( data ) ) ;
2519
+ aCallback ( lizMap . mainLizmap . utils . sanitizeGFIContent ( data ) ) ;
2526
2520
} ) ;
2527
2521
}
2528
2522
@@ -2596,7 +2590,7 @@ window.lizMap = function() {
2596
2590
// Query the server
2597
2591
$ . post ( globalThis [ 'lizUrls' ] . service , wmsOptions , function ( data ) {
2598
2592
if ( aCallback ) {
2599
- aCallback ( globalThis [ 'lizUrls' ] . service , wmsOptions , Utils . sanitizeGFIContent ( data ) ) ;
2593
+ aCallback ( globalThis [ 'lizUrls' ] . service , wmsOptions , lizMap . mainLizmap . utils . sanitizeGFIContent ( data ) ) ;
2600
2594
}
2601
2595
} ) ;
2602
2596
}
@@ -3249,7 +3243,7 @@ window.lizMap = function() {
3249
3243
if ( layerName && filter ) {
3250
3244
3251
3245
// Feature extent
3252
- const wfs = new WFS ( ) ;
3246
+ const wfs = new lizMap . mainLizmap . wfs ( ) ;
3253
3247
const wfsParams = {
3254
3248
TYPENAME : layerName ,
3255
3249
EXP_FILTER : filter
@@ -3259,7 +3253,7 @@ window.lizMap = function() {
3259
3253
3260
3254
// Feature info
3261
3255
if ( urlParameters . get ( 'popup' ) === 'true' ) {
3262
- const wms = new WMS ( ) ;
3256
+ const wms = new lizMap . mainLizmap . wms ( ) ;
3263
3257
const wmsParams = {
3264
3258
QUERY_LAYERS : layerName ,
3265
3259
LAYERS : layerName ,
@@ -3302,7 +3296,7 @@ window.lizMap = function() {
3302
3296
3303
3297
if ( featuresExtent ) {
3304
3298
for ( const feature of startupFeatures ) {
3305
- featuresExtent = extend ( featuresExtent , feature . bbox ) ;
3299
+ featuresExtent = lizMap . ol . extent . extend ( featuresExtent , feature . bbox ) ;
3306
3300
}
3307
3301
}
3308
3302
0 commit comments