The grounds
field within the Geocoding response contains a single grounds
that, when populated, gives contextual information about the immediate
territory that the geocoding is on. For example:
- If the geocode is a museum located inside of a park, the grounds may be the park.
- If the geocode is a shop within a strip mall, the grounds may be the strip mall.
- If the geocode is a restaurant within a sports complex, the grounds may be the sports complex.
- If the geocode is a building within a university, the grounds may be the university.
- If the geocode is an office building within a corporate campus, the grounds may be the corporate campus.
The grounds contains the following values:
outline
contains the GeoJSON encoding of the polygon that approximates the surface area of the earth covered by the grounds, using the RFC 7946 formatname
contains the name of the grounds and is an object with subfieldslanguage_code
andtext
Grounds are returned for some, but not all, places with a precise location, such as street addresses, buildings, and establishments. Places that represent large areas, such as cities and regions, won't be returned with grounds.
Request details
You can obtain navigation points in the following kinds of requests:
For any of these requests, you must supply this parameter:
extra_computations=GROUNDS
.
Example request
The following query uses place geocoding to obtain the grounds for a restaurant within a mall in Hackensack, New Jersey, United States:
https://maps.googleapis.com/maps/api/geocode/json?place_id=ChIJ-Wdg_3b6wokRjB1ux1e68XM&extra_computations=GROUNDS&key=YOUR_API_KEY
Example response
The response from the query above shows the grounds:
{
"grounds" : {
"display_name" : {
"language_code" : "en",
"text" : "The Shops at Riverside"
},
"outline" : {
"coordinates" : [
[
[
-74.03276087437951,
40.9079393287367
],
[
-74.0328096444231,
40.9079123990298
],
[
-74.032853573312,
40.9078787684781
],
[
-74.0329374864265,
40.907833205165
],
[
-74.0329543407656,
40.9076763372261
],
[
-74.0329762155439,
40.9076367262102
],
[
-74.03299916612821,
40.9075190685498
],
[
-74.0330511635356,
40.9071219006983
],
[
-74.0331433244228,
40.9065102533867
],
[
-74.03309025123249,
40.906473864115
],
[
-74.0330778794394,
40.9064567729216
],
[
-74.03304363287749,
40.9063779338105
],
[
-74.03298374620459,
40.9062267374933
],
[
-74.03284191870981,
40.9060418308559
],
[
-74.0327045736519,
40.9058626714851
],
[
-74.0324668194403,
40.9055539457374
],
[
-74.03218782543171,
40.9051507995429
],
[
-74.03202878431971,
40.9049213427489
],
[
-74.031980910588,
40.9048524525955
],
[
-74.0318966384468,
40.9047239669456
],
[
-74.03188946634801,
40.9047059572771
],
[
-74.0318858802984,
40.904689357769
],
[
-74.03188605960089,
40.9046316335439
],
[
-74.0317557066551,
40.9044960202159
],
[
-74.03166641393911,
40.9044030668361
],
[
-74.031603120081,
40.9043369552179
],
[
-74.0315466397082,
40.9042767712891
],
[
-74.03149625561549,
40.9042231654583
],
[
-74.0314272240077,
40.9041493230684
],
[
-74.0313515581648,
40.9040692773688
],
[
-74.031280374868,
40.9039955812079
],
[
-74.0312140327287,
40.9040621334267
],
[
-74.03094346414279,
40.9042364679492
],
[
-74.0309237407716,
40.9042490145166
],
[
-74.0309043760051,
40.9042578521067
],
[
-74.0308932591939,
40.9042613909983
],
[
-74.0308821423819,
40.9042634259862
],
[
-74.0308654671629,
40.9042639218323
],
[
-74.0285474182009,
40.9040980324443
],
[
-74.0285409631984,
40.9041506567763
],
[
-74.0284695995455,
40.9041477672732
],
[
-74.0284391175751,
40.904464680407
],
[
-74.0284416278552,
40.9044690964629
],
[
-74.0284448553581,
40.9044713582818
],
[
-74.0284504138353,
40.9044724463848
],
[
-74.0284848405289,
40.9044735630073
],
[
-74.02849255067299,
40.9047420452213
],
[
-74.0285024124847,
40.9047613382318
],
[
-74.0285088674885,
40.9047682680531
],
[
-74.0285178327711,
40.9047717937456
],
[
-74.02860246501849,
40.9047800216474
],
[
-74.0284446760524,
40.9060030191662
],
[
-74.02847533732761,
40.9060129264131
],
[
-74.0288760851204,
40.9060525457656
],
[
-74.0285884791836,
40.9069432827033
],
[
-74.02962647637111,
40.9069961651161
],
[
-74.029634186469,
40.906997858665
],
[
-74.0296395656068,
40.9070004251279
],
[
-74.0296417172619,
40.9070019329367
],
[
-74.02964422752621,
40.907003491537
],
[
-74.02964691709499,
40.9070070305046
],
[
-74.02964763431331,
40.907010440501
],
[
-74.02964727570421,
40.9070133973578
],
[
-74.02964619987669,
40.9070203129561
],
[
-74.02999046437181,
40.9070453118125
],
[
-74.03005788276261,
40.9077398485747
],
[
-74.0300808336987,
40.9080079189719
],
[
-74.03036987181341,
40.9080202832536
],
[
-74.03096784939891,
40.9080511362848
],
[
-74.03120058499491,
40.9080502612003
],
[
-74.0314021215987,
40.9080639151613
],
[
-74.03163754620471,
40.9080799617702
],
[
-74.03186472260489,
40.9080952909298
],
[
-74.0319188719515,
40.9080990493699
],
[
-74.0320239431563,
40.9080594910787
],
[
-74.0324187665168,
40.9080114893404
],
[
-74.0325363885767,
40.907988144292
],
[
-74.0326864641787,
40.9079585672777
],
[
-74.03276087437951,
40.9079393287367
]
]
],
"type" : "Polygon"
}
},
}
Using the JavaScript code similar to the example in Building outlines and entrances, we are able to render the grounds outline on the map:
Feedback
This is an experimental feature. We would appreciate feedback at geocoding-feedback-channel@google.com.