sjlu / cities

Lookup cities based on zipcodes or GPS coordinates
https://www.npmjs.com/package/cities
27 stars 15 forks source link

How to Add City #8

Closed willSonic closed 9 years ago

willSonic commented 9 years ago

Entering the zip 94501, returns Coast Guard Isla instead of Alameda. Coast Guard Isla is not a California City, County, it is small harbor and dock for the US Coast Guard. Is there a way to add Cities to Zip Codes?

sjlu commented 9 years ago

You'd have to edit the raw .json file. I currently do not have a way to auto-update these. Does the postal service return the proper city for you? See #4

willSonic commented 9 years ago

Hi Steven,

I actually forked it and updated the location.json in my version. When I put in the zipcode 94501, it returned with Coast Guard Isle, which is a small I island of the coast of Alameda. The correct City for the postal code 94501, is Alameda. This is what is returned when you go the USPS, https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=2&companyName=&address1=&address2=&city=&state=Select&urbanCode=&postalCode=94501&zip= https://tools.usps.com/go/ZipLookupResultsAction!input.action?resultMode=2&companyName=&address1=&address2=&city=&state=Select&urbanCode=&postalCode=94501&zip=

On Tue, Jul 28, 2015 at 6:49 AM, Steven Lu notifications@github.com wrote:

You'd have to edit the raw .json file. I currently do not have a way to auto-update these. Does the postal service return the proper city for you?

— Reply to this email directly or view it on GitHub https://github.com/sjlu/cities/issues/8#issuecomment-125616664.

sjlu commented 9 years ago

Gotcha.

Let me create a script that auto updates these locations from the postal service.

willSonic commented 9 years ago

Cool, Thank YOu...

sjlu commented 9 years ago

Hey @willSonic, I've made that script and am running it. I'll make a next bump with the name changes