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

replace getJSON with pure XHR/JSON.parse implementation #45

Closed
wants to merge 2 commits into from

Conversation

thisisaaronland
Copy link

I tried to replace the remaining jQuery dependencies but got lost in a twisty maze of Leaflet expectations.

The other issue is that this PR may not address older versions of IE, maybe?

@mejackreed mejackreed mentioned this pull request Sep 27, 2016
2 tasks
Copy link
Owner

@mejackreed mejackreed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for the contribution!

This is something I've wanted to do for a while so thanks for getting the ball rolling. Just a few minor comments, but overall looks great. I'm still waiting on my Windows vm to download so I can test in older versions of IE.

leaflet-iiif.js Outdated
onsuccess(data);
};

var onprocess = function(){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be onprogress?

catch (e){

console.log("Failed to parse JSON, because " + e);
console.log(raw);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there is a mix of tabs and four spaces. Mind converting over to two spaces?

@thisisaaronland
Copy link
Author

onprogress - yes

I'll sort the spaces out shortly. The next couple days are a bit nutty.

@mejackreed
Copy link
Owner

Popping this here for reference too. Not sure but we could include this plugin instead? https://github.com/calvinmetcalf/leaflet-ajax

@thisisaaronland
Copy link
Author

Well, it's your party so you should do whatever feels right :D

Looking over the code with sloppy eyes it's not clear what it gets you – the ajax.js code seems like the same basic XHR scaffolding as the PR – but I haven't looked at the rest very carefully.

I guess the larger issue is whether or not you want external dependencies for the iiif-leaflet plugin. If you do (or don't mind having them) then there are worse things that letting jQuery take care of the details for you.

@mejackreed
Copy link
Owner

Closing this now in favor of #77 .

@mejackreed mejackreed closed this Nov 11, 2019
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.

3 participants