Skip to content
This repository was archived by the owner on Feb 7, 2023. It is now read-only.

Commit 9fde572

Browse files
committed
Adapt for local development
1 parent 2a19d2e commit 9fde572

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

main.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import { OSM, Vector as VectorSource } from 'ol/source';
66
import { Tile as TileLayer, Vector as VectorLayer } from 'ol/layer';
77
import GeoJSON from 'ol/format/GeoJSON';
88

9+
// const oapiProcessesUrl = "https://demo.pygeoapi.io/stable/processes/hello-world/execution";
10+
const oapiProcessesUrl = "http://localhost:5000/processes/hello-world/execution";
11+
912
const raster = new TileLayer({
1013
source: new OSM(),
1114
});
@@ -83,17 +86,16 @@ draw.on('drawend', (event) => {
8386
featureProjection: 'EPSG:3857'
8487
});
8588
const geoJsonGeom = formatGeoJson.writeGeometry(polygonFeature3857.getGeometry());
86-
const url = "https://demo.pygeoapi.io/stable/processes/hello-world/execution";
89+
8790
const payload = {
88-
"mode": "async",
8991
"inputs": {
9092
"name": "Jakob",
91-
"customGeom": {
92-
"value": geoJsonGeom,
93+
"inputGeom": {
94+
"value": JSON.parse(geoJsonGeom),
9395
"mediaType": "application/geo+json"
9496
}
9597
}
9698
};
9799
console.log(payload);
98-
requestOapiProcesses(url, payload)
100+
requestOapiProcesses(oapiProcessesUrl, payload)
99101
})

0 commit comments

Comments
 (0)