mapbox / mapbox.js

Mapbox JavaScript API, a Leaflet Plugin
mapbox.com/mapbox.js/
Other
1.91k stars 386 forks source link

geocode returns leading zero stripped postCode #1369

Open Brennaleker opened 1 year ago

Brennaleker commented 1 year ago

I was doing some feature testing with Puerto Rican locations and found that at least one location returns a postCode of 920 rather than 00920 while several others with leading zeros return the full zip code. This was easy to handle for in our code but ideally it could be fixed in the db so that this exception doesn't surprise others.

location tested using forward search: 1332 Avenida Franklin Delano Roosevelt San Juan, Puerto Rico

Returned from api: buh bye 0s

Verified zip code should be 00920: 00920