geocoder-php / Geocoder

The most featured Geocoder library written in PHP.
https://geocoder-php.org
MIT License
3.95k stars 519 forks source link

Field like "Building Name"? #409

Closed tannermccoleman closed 7 years ago

tannermccoleman commented 9 years ago

OpenCage has the "house" field in some of their results, which shows the name of the building. Here's an example for the Duncan Building at 119 W Pender St, Vancouver, BC:

components: {
    city: "Vancouver",
    country: "Canada",
    country_code: "ca",
    county: "Greater Vancouver Regional District",
    house: "Duncan Building",
    house_number: "119",
    postcode: "V6B 1G8",
    road: "West Pender Street",
    state: "British Columbia",
    suburb: "Gastown"
}

Could a field be added in to include this information? I'm not sure if other providers have similar fields, but it can be very useful information for geocoding apartment and office buildings.

Baachi commented 9 years ago

If other provider also support this, sure we can implement it, if OpenCage is the only provider, we can't include them.

stevevance commented 9 years ago

Mapzen's Pelias service provides the building name if they know, pulling from OpenStreetMap and Geonames.

aight8 commented 8 years ago

Sure you can implement specific information. Just add another field which holds the response of the provider.

Nyholm commented 7 years ago

Sorry for the very late response. This is now very easy to achieve. See https://github.com/geocoder-php/Geocoder/pull/624

I will close this issue, do not think that I do not want to see this feature. I will be happy to review a PR.