extractLocation: Extract location from coordinate request

View source: R/getLocation.R

extractLocationR Documentation

Extract location from coordinate request

Description

Extract location from coordinate request

Usage

extractLocation(res, details = NULL)

Arguments

res

Required. Response object returned by [getLocation()] with 'output = "JSON"' or by the AutoNavi reverse-geocoding API.

details

Optional. Character vector describing which extended detail payloads to parse into list-columns. Valid values are '"pois"', '"roads"', '"roadinters"', and '"aois"'. Use '"all"' to include every detail payload.

Value

A 'tibble' describing the parsed reverse-geocode results. Each row corresponds to an element in the API response. When no data is present a single placeholder row filled with 'NA' values is returned.

See Also

[getLocation()]

Examples

## Not run: 
raw <- getLocation(104.043284, 30.666864, output = "JSON")
extractLocation(raw, details = c("pois", "roads"))

## End(Not run)


amapGeocode documentation built on Jan. 19, 2026, 9:07 a.m.