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

problem with Internet Explorer #49

Closed
ghassenrachid opened this issue Apr 17, 2017 · 4 comments
Closed

problem with Internet Explorer #49

ghassenrachid opened this issue Apr 17, 2017 · 4 comments

Comments

@ghassenrachid
Copy link

function export_shp(){
	var tab_markers = export_map();
		var options = {
			types: {
				point: 'points',
				polygon: 'polygons',
				line: 'pipes'
			}
		}
		shpwrite.download({
        	type: 'FeatureCollection',
        	features: tab_markers
    	}, options);	
}

my code work with chrome and firefox but when i use internet explorer the browser ask me if i want to allow the website to open an application on my computer
when i allow it say "there is no application installed that can open this type of link (data)"

@ghassenrachid
Copy link
Author

ghassenrachid commented Apr 19, 2017

i think that the problem is when IE execute the MIME type application/zip

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

i tried to use another MIME type from msdn.microsoft.com like application/x-zip-compressed but i have the same problem with IE

@Miroko Miroko mentioned this issue Jun 14, 2017
@DemersM
Copy link

DemersM commented Nov 16, 2017

For IE, there could be avantage to put the binary into a blob and use the navigator.msSaveBlob() function

https://stackoverflow.com/a/36899900/1914034

@sheindel
Copy link
Contributor

This has been fixed in the latest tag (v0.4.0). Will be released on npm soon.

@sheindel
Copy link
Contributor

Good news: v0.4.2 is now available.

Less good news: Mapbox changed their deployment organization so this package is now hosted under a different package

@mapbox/shp-write
https://unpkg.com/@mapbox/shp-write@latest/shpwrite.js

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

No branches or pull requests

3 participants