Include a very basic, complete example as documentation?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 321
- Forks
- 195
- PR merge metrics
- No merged PRs in 30d
Description
First: thanks for your excellent work!
I'm a HTML+JS noobie, and it would have helped me a lot to see a complete, minimal example, with just HTML+JS:
```html
Shapefile Export
Export Shapefile
function exportShapefile() {
// Sample data
var data = {
type: 'FeatureCollection',
features: [{
type: 'Feature',
properties: {
name: 'Some polygon'
},
geometry: {
type: 'Polygon',
coordinates: [[
[-64.8, 32.3], [-65.5, 18.3], [-80.3, 25.2], [-64.8, 32.3]]]
}
}]
};
// Save the zip file
shpwrite.zip(data, { outputType: "blob" }).then(function (zipBlob) {
saveAs(zipBlob, "my_shapefile.zip");
});
}
```
It can be run here: https://jsfiddle.net/pd14t8ew/2/
It's really not very different from the existing doc, but it took me a while to find the correct inputs.
If you're interested, I could write a corresponding PR for documentation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the existing documentation and compare it with the complete HTML+JS example and jsfiddle.net link in the issue. Add a minimal runnable example showing the required inputs and shapefile export, then verify that a reader can follow it from a blank HTML file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100