1
1
import geoServerUrl from './geoserver-url' ;
2
2
3
- const DATA_TEMPLATE = ( { area, coordinates, layer, abstraction } ) =>
3
+ const DATA_TEMPLATE = ( { area, coordinates, layer, outres , abstraction } ) =>
4
4
JSON . stringify ( {
5
5
type : 'FeatureCollection' ,
6
6
name : 'point' ,
@@ -13,6 +13,7 @@ const DATA_TEMPLATE = ({ area, coordinates, layer, abstraction }) =>
13
13
type : 'Feature' ,
14
14
properties : {
15
15
fid : 1 ,
16
+ outres,
16
17
layer,
17
18
area,
18
19
abstraction,
@@ -25,10 +26,11 @@ const DATA_TEMPLATE = ({ area, coordinates, layer, abstraction }) =>
25
26
] ,
26
27
} , 0 , false ) ;
27
28
28
- export default async function getAbstractionData ( { area, coordinates, layer, abstraction } ) {
29
- const data = DATA_TEMPLATE ( { area, coordinates, layer, abstraction } ) ;
29
+ export default async function getAbstractionData ( { area, coordinates, layer, outres , abstraction } ) {
30
+ const data = DATA_TEMPLATE ( { area, coordinates, layer, outres , abstraction } ) ;
30
31
const url = await geoServerUrl ( {
31
- url : process . env . VUE_APP_GEO_SERVER + '/wps' ,
32
+ // url: process.env.VUE_APP_GEO_SERVER + '/wps',
33
+ url : 'https://basisrivierbodemligging-test.avi.deltares.nl/wps' ,
32
34
request : 'Execute' ,
33
35
service : 'WPS' ,
34
36
identifier : 'brl_wps_abstraction' ,
@@ -37,7 +39,7 @@ export default async function getAbstractionData ({ area, coordinates, layer, ab
37
39
DataInputs : 'geojson_point=' + data ,
38
40
} ) ;
39
41
40
- return fetch ( url )
42
+ return fetch ( url , { mode : 'no-cors' } )
41
43
. then ( response => response . text ( ) )
42
44
. then ( string => {
43
45
const document = new window . DOMParser ( ) . parseFromString ( string , 'text/xml' ) ;
0 commit comments