Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mistake when use ArrayBuffer #65

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from

Conversation

DistChen
Copy link

No description provided.

@calvinmetcalf
Copy link
Owner

we probably want to keep the old misspelled version to so have it check for both i think

@DistChen
Copy link
Author

we probably want to keep the old misspelled version to so have it check for both i think

yes, you are right!

I have another idea. Is it possible to modify like this in order to delete this config in options ?

var promise;
if (file instanceof ArrayBuffer) {
      promise = this.worker.data(file, [file]);
} else {
     promise = this.worker.data(cw.makeUrl(file));
}

initialize method :

if (!(file instanceof ArrayBuffer)) {
    this.worker = cw(new Function('data', 'cb', 'importScripts("' + this.options.importUrl + '");shp(data).then(cb);'));
} else {
    this.worker = cw(new Function('data', 'importScripts("' + this.options.importUrl + '"); return shp.parseZip(data);'));
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants