This type should be based on header.shapeType; it’s not always a Polygon.

```js
var type = {
  1: "Point",
  3: "LineString",
  5: "Polygon",
  8: "MultiPoint", // MultiPoint
  11: "Point", // PointZ
  13: "LineString", // PolyLineZ
  15: "Polygon", // PolygonZ
  18: "MultiPoint" // MultiPointZ
};
```

Well, technically the LineString and Polygon types could be MultiLineString or MultiPolygon, since these are represented as the same shapeType in Shapefiles.