You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Tabular-style properties export with [10 character field name length limit](https://en.wikipedia.org/wiki/Shapefile#:~:text=Maximum%20length%20of%20field%20names%20is%2010%20characters)
35
32
- Uses jsZip for ZIP files, but [compression is buggy](https://github.com/Stuk/jszip/issues/53) so it uses STORE instead of DEFLATE.
36
33
37
-
## Minimal Example
34
+
## Example
38
35
39
36
```js
40
37
var shpwrite =require("@mapbox/shp-write");
41
38
42
-
// a GeoJSON bridge for features
43
-
constzipData=shpwrite.zip(
44
-
{
39
+
constgeoJSON= {
45
40
type:"FeatureCollection",
46
41
features: [
47
42
{
@@ -65,16 +60,9 @@ const zipData = shpwrite.zip(
65
60
},
66
61
},
67
62
],
68
-
}
69
-
);
70
-
71
-
```
72
-
73
-
## Options Example
74
-
75
-
```js
76
-
var shpwrite =require("@mapbox/shp-write");
63
+
};
77
64
65
+
// Optional custom options passed to the underlying `zip` call
Generate a ArrayBuffer of a zipped shapefile, dbf, and prj, from a GeoJSON
148
117
object.
149
118
150
-
### DEPRECTEAD! May be removed in a future version
151
119
### `download(geojson, [options])`
152
120
153
-
Given a [GeoJSON](http://geojson.org/) FeatureCollection as an object,
154
-
converts convertible features into Shapefiles and triggers a download.
155
-
156
-
The additional `options` parameter is passed to the underlying `zip` call.
157
-
158
-
This is now marked as deprecated because it applies to browsers only and the
121
+
> [!WARNING]
122
+
> This is now marked as deprecated because it applies to browsers only and the
159
123
user should instead rely on an external library for this functionality like
160
124
`file-saver` or `downloadjs`
161
125
126
+
Given a [GeoJSON](http://geojson.org/) FeatureCollection as an object, converts convertible features into Shapefiles and triggers a download. `options` is passed to the underlying `zip` call.
0 commit comments