quickgeojson icon indicating copy to clipboard operation
quickgeojson copied to clipboard

Doesn't work, not sure what's wrong

Open aaronpk opened this issue 11 years ago • 8 comments
trafficstars

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.

aaronpk avatar Jul 21 '14 22:07 aaronpk

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."

irees avatar Jul 22 '14 19:07 irees

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.

aaronpk avatar Jul 22 '14 19:07 aaronpk

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.

irees avatar Jul 22 '14 20:07 irees

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.

aaronpk avatar Jul 22 '14 20:07 aaronpk

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

irees avatar Jul 22 '14 20:07 irees

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.)

firesharker avatar Jul 27 '18 18:07 firesharker

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

Mechazawa avatar Oct 30 '19 13:10 Mechazawa

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?

JanC avatar Jan 27 '20 21:01 JanC