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

Doesn't work, not sure what's wrong #2

Open
aaronpk opened this issue Jul 21, 2014 · 8 comments
Open

Doesn't work, not sure what's wrong #2

aaronpk opened this issue Jul 21, 2014 · 8 comments

Comments

@aaronpk
Copy link
Contributor

aaronpk commented Jul 21, 2014

I installed the plugin and now QuickLook is clearly trying to load the plugin on .geojson files. However the preview window is just white. I'm not sure how to debug, or how to run this from XCode so I can see it live without building and archiving it from XCode.

@irees
Copy link
Owner

irees commented Jul 22, 2014

You can generate the preview by running:

mkdir test; qlmanage -o test -p file.geojson

Which will create test/file.geojson.qlpreview. You can then open Preview.html with Firebug, etc.

There is an issue that I have not yet resolved involves the plugin intermittently failing to read the geojson data, even on the same file.

NSData *data = [NSData dataWithContentsOfURL:nsurl];

That could be the cause of your white window; when this happens, the plugin simply exits. I should add a more useful message than an empty window when this occurs. Any suggestions you have would be welcome; it's what is keeping me from considering the project "broadly useful."

@aaronpk
Copy link
Contributor Author

aaronpk commented Jul 22, 2014

Thanks! That's super helpful. I tried it and got this result on the console:

Testing Quick Look preview with files:
    test.geojson
[ERROR] Computing 6571367.27687927 raised '*** -[__NSCFString stringByReplacingOccurrencesOfString:withString:options:range:]: nil argument'
* /Users/aaronpk/Code/tmp/test.geojson did not produce any preview

As for the white window, probably just a message like "A preview was unable to be loaded at this time. Try again." would work.

@irees
Copy link
Owner

irees commented Jul 22, 2014

Can you run it a few times? Do you get the same result each time? If so, can you post the file you tested with, or you may send it to me privately.

@aaronpk
Copy link
Contributor Author

aaronpk commented Jul 22, 2014

Oh funny... yeah it worked (with a bunch of weird errors) the second time. Generated a Preview.html file which is exactly what I would have expected. Still no luck in QuickLook no matter how many times I try it.

@irees
Copy link
Owner

irees commented Jul 22, 2014

I added a file to the repository, quicklookgeojson/test.geojson. Can you try this file with both Finder and qlmanage?

@firesharker
Copy link

I got the same issue. If I generate a preview with qlmanage -o test -p test.geojson then open the result with Safari it works perfectly, but if I just press space on the file Quick Look displays only a white background. Do you have any idea what could be the problem? (I am on 10.9.5.)

@Mechazawa
Copy link

I got the same issue. If I generate a preview with qlmanage -o test -p test.geojson then open the result with Safari it works perfectly, but if I just press space on the file Quick Look displays only a white background. Do you have any idea what could be the problem? (I am on 10.9.5.)

I think this plugin was just using an expired key or something. Try switching to a different data provider such as carto that fixed it for me.

You can manually apply the patch by opening up the package contents.

image

@JanC
Copy link

JanC commented Jan 27, 2020

hey,
I have the same issue. The preview renders the geojson correctly but the background map is empty. Using the carto provider from that PR works fine.

@irees any chance you merge that PR?

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

5 participants