This repository was archived by the owner on Feb 7, 2023. It is now read-only.
File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ import { OSM, Vector as VectorSource } from 'ol/source';
6
6
import { Tile as TileLayer , Vector as VectorLayer } from 'ol/layer' ;
7
7
import GeoJSON from 'ol/format/GeoJSON' ;
8
8
9
+ // const oapiProcessesUrl = "https://demo.pygeoapi.io/stable/processes/hello-world/execution";
10
+ const oapiProcessesUrl = "http://localhost:5000/processes/hello-world/execution" ;
11
+
9
12
const raster = new TileLayer ( {
10
13
source : new OSM ( ) ,
11
14
} ) ;
@@ -83,17 +86,16 @@ draw.on('drawend', (event) => {
83
86
featureProjection : 'EPSG:3857'
84
87
} ) ;
85
88
const geoJsonGeom = formatGeoJson . writeGeometry ( polygonFeature3857 . getGeometry ( ) ) ;
86
- const url = "https://demo.pygeoapi.io/stable/processes/hello-world/execution" ;
89
+
87
90
const payload = {
88
- "mode" : "async" ,
89
91
"inputs" : {
90
92
"name" : "Jakob" ,
91
- "customGeom " : {
92
- "value" : geoJsonGeom ,
93
+ "inputGeom " : {
94
+ "value" : JSON . parse ( geoJsonGeom ) ,
93
95
"mediaType" : "application/geo+json"
94
96
}
95
97
}
96
98
} ;
97
99
console . log ( payload ) ;
98
- requestOapiProcesses ( url , payload )
100
+ requestOapiProcesses ( oapiProcessesUrl , payload )
99
101
} )
You can’t perform that action at this time.
0 commit comments