Skip to content

Problem: In final shapefile, I get less geometries than dbf rows.  #64

@mikelaaf

Description

@mikelaaf

Hi,
I am using in browser. I have tried several geoJson. I have always obtained the same result. Less geometries than dbf rows in final shapefile.
I load in my page the js.

<script src="./js/shpwrite.js" type="text/javascript"></script>

(with updated version 10/01/2018)
I changed in this js the needed parts to work in JSZIP 3.0.
//this
//var generateOptions = { compression:'STORE' };
//if (!process.browser) {
// generateOptions.type = 'nodebuffer';
//}
//return zip.generate(generateOptions);

//with this
var generateOptions = { compression: 'STORE', type: 'base64' };
if (!process.browser) {
generateOptions.type = 'nodebuffer';
}
return zip.generateAsync(generateOptions);

//this
//module.exports = function(gj, options) {
// var content = zip(gj, options);
// location.href = 'data:application/zip;base64,' + content;
//};
//with this
module.exports = function (gj, options) {
zip(gj, options).then(function (content) {
location.href = 'data:application/zip;base64,' + content;
});
};

I have revised a lot of times, but I don't find the problem.
Any solution? Thanks in advanced.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions