camptocamp / inkmap

A library for generating high-quality, printable maps on the browser.
Other
86 stars 17 forks source link

Incorrect documentation for PrintStatus #54

Closed jussih closed 1 year ago

jussih commented 1 year ago

The documentation states the following:

PrintStatus type

A PrintStatus object describes the status of a print job.

field type description
id number Job id.
progress number Job progress, from 0 to 1.
status string Either 'pending', 'ongoing', 'finished' or 'canceled'.
resultImageUrl string An URL used to access the print result (PNG image). This will only be available once the job status is 'finished'.

The actual PrintStatus emitted by the observable returned from getJobStatus([id]) looks like the following. imageBlob is null until the operation is finished.

{
  id: 0
  ​imageBlob: Blob { size: 4012847, type: "image/png" }
  ​progress: 1
  ​sourceLoadErrors: Array []
  ​spec: Object { dpi: 300, scale: 3260.5795017802066, projection: "EPSG:3067", … }
  ​status: "finished"
}
jahow commented 1 year ago

That's right, the API doc is currently made by hand and it is no surprise that it contains errors... Would you be able to issue a pull request for this?