quickgeojson
quickgeojson copied to clipboard
Doesn't work, not sure what's wrong
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.
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."
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.
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.
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.
I added a file to the repository, quicklookgeojson/test.geojson. Can you try this file with both Finder and qlmanage?
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 got the same issue. If I generate a preview with
qlmanage -o test -p test.geojsonthen 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.

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?