koopjs / FeatureServer

An open source Geoservices Implementation (deprecated)
https://geoservices.github.io
Other
104 stars 32 forks source link

Error: Input classification type invalid:undefined-winnow/dist/options/normalizeClassification.js #84

Closed jmamanpara closed 6 years ago

jmamanpara commented 6 years ago
rgwozdz commented 6 years ago

@jmamanpara I'm currently unable to reproduce this. Your stack trace points us to here and suggests that the classificationDef.type is undefined. But the request URL you note above has classificationDef={"type":"classBreaksDef"}. When I issue a similar request on my own instance with the same query string, the request proceed to (https://github.com/koopjs/winnow/blob/master/src/options/normalizeClassification.js#L10). Are you able to put a break point into [here] (https://github.com/koopjs/winnow/blob/master/src/options/normalizeClassification.js#L9) and report the value of inClass?

I might also note here that your request has parameter classificationMethod equal to esriClassifyGeometricalInterval, which is currently unsupported. However, that doesn't seem to be the source of the error reported above.

rgwozdz commented 6 years ago

@jmamanpara - anything to add with respect to my June 4 comment?

jmamanpara commented 6 years ago

Parsed param for 'classificationDef' to JSON before sending request to koop helped to resolve the issue. i.e. if (param === 'classificationDef') { params[param] = (typeof params[param] === "string") ? JSON.parse(params[param]) : params[param]; }

Thanks @rgwozdz. Closing the issue.