Skip to content

Commit 1e7fa59

Browse files
authored
[Maps][Search V2] add query to geocoding api (#17207)
* add a new query parameter, query, to geocoding api * update parameter description * refine description * move ClientId to end of parameters for autorest * add a description to note that batch geocoding doesn't support the parameter, query
1 parent 0e23c19 commit 1e7fa59

File tree

7 files changed

+1374
-0
lines changed

7 files changed

+1374
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-02-01-preview",
4+
"addressLine": "15127 NE 24th Street",
5+
"locality": "Redmond",
6+
"adminDistrict": "WA",
7+
"AzureKey": "[subscription-key]"
8+
},
9+
"responses": {
10+
"200": {
11+
"headers": {
12+
"Content-Type": "application/geo+json"
13+
},
14+
"body": {
15+
"type": "FeatureCollection",
16+
"features": [
17+
{
18+
"type": "Feature",
19+
"properties": {
20+
"address": {
21+
"countryRegion": {
22+
"name": "United States"
23+
},
24+
"adminDistricts": [
25+
{
26+
"shortName": "WA"
27+
},
28+
{
29+
"shortName": "King County"
30+
}
31+
],
32+
"formattedAddress": "15127 NE 24th St, Redmond, WA 98052",
33+
"locality": "Redmond",
34+
"postalCode": "98052",
35+
"addressLine": "15127 NE 24th St"
36+
},
37+
"type": "Address",
38+
"confidence": "High",
39+
"matchCodes": [
40+
"Good"
41+
],
42+
"geocodePoints": [
43+
{
44+
"geometry": {
45+
"type": "Point",
46+
"coordinates": [
47+
-122.138681,
48+
47.630358
49+
]
50+
},
51+
"calculationMethod": "Rooftop",
52+
"usageTypes": [
53+
"Display"
54+
]
55+
},
56+
{
57+
"geometry": {
58+
"type": "Point",
59+
"coordinates": [
60+
-122.1386787,
61+
47.6302179
62+
]
63+
},
64+
"calculationMethod": "Rooftop",
65+
"usageTypes": [
66+
"Route"
67+
]
68+
}
69+
]
70+
},
71+
"geometry": {
72+
"type": "Point",
73+
"coordinates": [
74+
-122.138681,
75+
47.630358
76+
]
77+
},
78+
"bbox": [
79+
-122.14632282407,
80+
47.626495282429325,
81+
-122.13103917593001,
82+
47.63422071757068
83+
]
84+
}
85+
]
86+
}
87+
}
88+
}
89+
}
Lines changed: 258 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,258 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-02-01-preview",
4+
"AzureKey": "[subscription-key]",
5+
"geocodingBatchRequestBody": {
6+
"batchItems": [
7+
{
8+
"addressLine": "One, Microsoft Way, Redmond, WA 98052",
9+
"top": 2,
10+
"optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B"
11+
},
12+
{
13+
"addressLine": "Pike Pl",
14+
"adminDistrict": "WA",
15+
"locality": "Seattle",
16+
"top": 3
17+
}
18+
]
19+
}
20+
},
21+
"responses": {
22+
"200": {
23+
"body": {
24+
"summary": {
25+
"successfulRequests": 2,
26+
"totalRequests": 2
27+
},
28+
"batchItems": [
29+
{
30+
"optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B",
31+
"type": "FeatureCollection",
32+
"features": [
33+
{
34+
"type": "Feature",
35+
"properties": {
36+
"address": {
37+
"countryRegion": {
38+
"name": "United States"
39+
},
40+
"adminDistricts": [
41+
{
42+
"shortName": "WA"
43+
},
44+
{
45+
"shortName": "King County"
46+
}
47+
],
48+
"formattedAddress": "1 Microsoft Way, Redmond, WA 98052",
49+
"locality": "Redmond",
50+
"postalCode": "98052",
51+
"addressLine": "1 Microsoft Way"
52+
},
53+
"type": "Address",
54+
"confidence": "Medium",
55+
"matchCodes": [
56+
"Good"
57+
],
58+
"geocodePoints": [
59+
{
60+
"geometry": {
61+
"type": "Point",
62+
"coordinates": [
63+
-122.128275,
64+
47.639429
65+
]
66+
},
67+
"calculationMethod": "Rooftop",
68+
"usageTypes": [
69+
"Display"
70+
]
71+
},
72+
{
73+
"geometry": {
74+
"type": "Point",
75+
"coordinates": [
76+
-122.127028,
77+
47.638545
78+
]
79+
},
80+
"calculationMethod": "Rooftop",
81+
"usageTypes": [
82+
"Route"
83+
]
84+
}
85+
]
86+
},
87+
"geometry": {
88+
"type": "Point",
89+
"coordinates": [
90+
-122.128275,
91+
47.639429
92+
]
93+
},
94+
"bbox": [
95+
-122.1359181505759,
96+
47.63556628242932,
97+
-122.1206318494241,
98+
47.643291717570676
99+
]
100+
}
101+
]
102+
},
103+
{
104+
"type": "FeatureCollection",
105+
"features": [
106+
{
107+
"type": "Feature",
108+
"properties": {
109+
"address": {
110+
"countryRegion": {
111+
"name": "United States"
112+
},
113+
"adminDistricts": [
114+
{
115+
"shortName": "WA"
116+
},
117+
{
118+
"shortName": "King County"
119+
}
120+
],
121+
"formattedAddress": "Pike Pl, Seattle, WA 98101",
122+
"locality": "Seattle",
123+
"postalCode": "98101",
124+
"addressLine": "Pike Pl"
125+
},
126+
"type": "RoadBlock",
127+
"confidence": "High",
128+
"matchCodes": [
129+
"Good"
130+
],
131+
"geocodePoints": [
132+
{
133+
"geometry": {
134+
"type": "Point",
135+
"coordinates": [
136+
-122.341979399674,
137+
47.6095253501216
138+
]
139+
},
140+
"calculationMethod": "Interpolation",
141+
"usageTypes": [
142+
"Display"
143+
]
144+
}
145+
]
146+
},
147+
"geometry": {
148+
"type": "Point",
149+
"coordinates": [
150+
-122.341979399674,
151+
47.6095253501216
152+
]
153+
},
154+
"bbox": [
155+
-122.34961817972945,
156+
47.605662632550924,
157+
-122.33434061961856,
158+
47.61338806769228
159+
]
160+
}
161+
]
162+
}
163+
]
164+
}
165+
},
166+
"206": {
167+
"body": {
168+
"summary": {
169+
"successfulRequests": 1,
170+
"totalRequests": 2
171+
},
172+
"batchItems": [
173+
{
174+
"type": "FeatureCollection",
175+
"features": [
176+
{
177+
"type": "Feature",
178+
"properties": {
179+
"type": "Address",
180+
"confidence": "High",
181+
"matchCodes": [
182+
"Good"
183+
],
184+
"address": {
185+
"locality": "Redmond",
186+
"adminDistricts": [
187+
{
188+
"shortName": "WA"
189+
},
190+
{
191+
"shortName": "King"
192+
}
193+
],
194+
"countryRegion": {
195+
"ISO": "US",
196+
"name": "United States"
197+
},
198+
"postalCode": "98052",
199+
"formattedAddress": "1 Microsoft Way, Redmond, WA 98052",
200+
"addressLine": "1 Microsoft Way"
201+
},
202+
"geocodePoints": [
203+
{
204+
"geometry": {
205+
"type": "Point",
206+
"coordinates": [
207+
-122.128275,
208+
47.639429
209+
]
210+
},
211+
"calculationMethod": "Rooftop",
212+
"usageTypes": [
213+
"Display",
214+
"Route"
215+
]
216+
},
217+
{
218+
"geometry": {
219+
"type": "Point",
220+
"coordinates": [
221+
-122.127028,
222+
47.638545
223+
]
224+
},
225+
"calculationMethod": "Rooftop",
226+
"usageTypes": [
227+
"Route"
228+
]
229+
}
230+
]
231+
},
232+
"geometry": {
233+
"type": "Point",
234+
"coordinates": [
235+
-122.128275,
236+
47.639429
237+
]
238+
},
239+
"bbox": [
240+
-122.1359181505759,
241+
47.63556628242932,
242+
-122.1206318494241,
243+
47.643291717570676
244+
]
245+
}
246+
]
247+
},
248+
{
249+
"error": {
250+
"code": "400",
251+
"message": "Invalid request."
252+
}
253+
}
254+
]
255+
}
256+
}
257+
}
258+
}

0 commit comments

Comments
 (0)