Search code examples
.netgoogle-mapsgoogle-maps-api-3

Extracting park names from Google Maps API response


I'm using the .NET Nuget GoogleMapsAPI package and creating a reverse geocoding request for locations..

An example is this one:
Namadgi National Park
Tharwa ACT 2620
-35° 31.871', 148° 54.000'

If you type those coordinates into Google Maps, you can see clearly in the UI popup response that this location is inside the "Namadgi National Park". I also notice you can click around anywhere and the text will change to whatever the appropriate national park or area is that you've clicked in, including dams and all kinds of physical bodies. But I'm not seeing this value anywhere in the V3 geocoding API response.

Should I be calling the Places API or something else to actually work out "which national park or large region this location resides within"? I've iterated through all the AddressComponents in the reverse geocoder response and I can't see the name of the national park anywhere in the response.


Solution

  • The geocoding response will simply return the address components and I can't imagine the park would be mentioned.

    A query to the places API will return the mentionables within the area and anything of note including the park itself. The boundary notification (this point is within such park) however is likely (I am not 100% on this but it seems logical) a feature that Google has kept for themselves. Google does not provide access to all of its map features through the API, and one of the most obvious omissions is boundary information.