Skip to content
This repository was archived by the owner on Oct 11, 2024. It is now read-only.
This repository was archived by the owner on Oct 11, 2024. It is now read-only.

Get wpsResponse with application/json directly #100

@Gaetanbrl

Description

@Gaetanbrl

Hi,

We get a GeoJSON response from WPS as application/json to display on our OpenLayers map.

In this current version, we can only use row or document (textxml output format) but Openlayers can't correctly parsed the XML return by this type or response.

So, we need to allow application/json output format with wps-js lib because it works well with OpenLayers (tested).

For the test, we have change this code :

var ExecuteResponse_v1_xml = ExecuteResponse
.extend({
instantiate : function(wpsResponse) {
if ($(wpsResponse).find("wps\\:ExecuteResponse, ExecuteResponse").length > 0) {

By adding on top something like that :

if (wpsResponse.type && wps.type == "featureCollection") { // get featureCollection json from wps response
	return wpsResponse
}

... and this work better.

Is it correct and how allow application/json format if not ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions