calvinmetcalf / shapefile-js

Convert a Shapefile to GeoJSON. Not many caveats.
http://calvinmetcalf.github.io/shapefile-js/
MIT License
735 stars 230 forks source link

issue importing zip #87

Closed joyboy-us closed 3 years ago

joyboy-us commented 7 years ago

I am trying to use his package in an app I am building and I am unable to import shapefile zip to convert to GEOjson as the example shows, any insights would be greatly appreciated.

calvinmetcalf commented 7 years ago

what did you do exactly?

is there an error in the console?

is there an error in a promise somewhere?

there are an infinite ways to code something incorrectly so I'm going to need a few more details

joyboy-us commented 7 years ago

This is the error i get { Error: connect ECONNREFUSED 127.0.0.1:80 at Object._errnoException (util.js:1026:11) at _exceptionWithHostPort (util.js:1049:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1174:14) code: 'ECONNREFUSED', errno: 'ECONNREFUSED', syscall: 'connect', address: '127.0.0.1', port: 80 }

i did npm install shpjs --save and brought in shpjs to my service file and i am able to hit the api, im pointing to the right file and i get the above message.

screen shot 2017-09-29 at 10 39 04 am

calvinmetcalf commented 7 years ago

and http://localhost:80/testShp.zip has a file at it ?

joyboy-us commented 7 years ago

yeah its in the root of my project as a test

joyboy-us commented 7 years ago

localhost:8080*

calvinmetcalf commented 7 years ago

the error you are getting is that it can't access http://localhost:80/testShp.zip

joyboy-us commented 7 years ago

alright so i changed the file path a couple of times and get the same result everytime, why would it be looking at localhost 80?

calvinmetcalf commented 7 years ago

maybe try loading with a fully qualified url with the http and what not