Open turbobuilt opened 9 years ago
I believe you need to do
var contents = r.result;
That's how I've done it at http://leaflet.calvinmetcalf.com
I changed it to r.result, and got the same error. Using the Javascript debugger in chrome indicates that it is indeed an array buffer that I am passing in both instances. What's more, the same shape file loads fine via AJAX. Any ideas?
Hm I can look into it tommorow
On Sun, May 10, 2015, 4:12 PM dtruel notifications@github.com wrote:
I changed it to r.result, and got the same error. Using the Javascript debugger in chrome indicates that it is indeed an array buffer that I am passing in both instances. What's more, the same shape file loads fine via AJAX. Any ideas?
— Reply to this email directly or view it on GitHub https://github.com/calvinmetcalf/leaflet.shapefile/issues/22#issuecomment-100691996 .
oo make sure you are not using a worker (aka make sure catiline is not on the page) as that will assume it's a url.
Awesome, that fixed it! I never would have guessed that myself as I'm not familiar with workers/catiline. Thanks a million!
Are there any plans for supporting passing arrayBuffers to the worker?
Hello, I'm having an issue loading a raw arraybuffer into the shapefile program. Here is the error I get in chrome:
GET http://domain.com/dir/rawinflate.min.js.map 404 (Not Found) [object%20ArrayBuffer].shp:1 GET http://domain.com/dir/[object%20ArrayBuffer].shp 404 (Not Found) [object%20ArrayBuffer].prj:1 GET http://domain.com/dir//[object%20ArrayBuffer].prj 404 (Not Found) [object%20ArrayBuffer].dbf:1 GET http://domain.com/dir//[object%20ArrayBuffer].dbf 404 (Not Found)
The plugin is working fine if I load from a url, but I'm just having an issue here. To load it, I use
This may very well be an issue on my end, and if so, sorry for opening an issue.