Updated Implementing formats with ol.format.Format (markdown)

Tom Payne
2014-02-11 09:51:24 -08:00
parent 151fdbd3ce
commit ea42659089

@@ -12,4 +12,10 @@ The IGC format contains only one feature per file, so `readFeature` returns that
For formats that only contain a single geometry, like WKB and WKT, `readGeometry` should return that geometry, `readFeature` should return a feature with its geometry set to the geometry read from the file, and `readFeatures` should return an array containing the single feature returned by `readFeature`.
If a file cannot be parsed, then the return value should be `null` for all three cases. Parsing failures should not raise exceptions (although exceptions can be used internally).
If a file cannot be parsed, then the return value should be `null` for all three cases. Parsing failures should not raise exceptions (although exceptions can be used internally).
## Handling errors
There are an infinite number of ways that data can not meet a specification. It would be an endless battle to try to enumerate and return error messages for each and every single one of them. Formats with multiple features might contain a mix of correctly-formed and malformed features. Should an error be returned in this case?
`ol.format.Format` that it should read as many features as it can, skipping features with any errors.