|
1 |
| - |
2 | 1 | ---
|
3 | 2 | title: Enter and resolve address in maps
|
4 | 3 | description: Use the address input component in your apps to let users search for and find addresses.
|
@@ -210,220 +209,6 @@ The following table lists the output properties available.
|
210 | 209 | ## Other geospatial components
|
211 | 210 |
|
212 | 211 | To visualize and interpret ___location data, use the **[Interactive map](geospatial-component-map.md)** component.
|
213 |
| -======= |
214 |
| ---- |
215 |
| -title: Enter and resolve address in maps |
216 |
| -description: Use the address input component in your apps to let users search for and find addresses. |
217 |
| -author: iaanw |
218 |
| -manager: shellyha |
219 |
| -ms.service: powerapps |
220 |
| -ms.topic: conceptual |
221 |
| -ms.custom: canvas, ce06122020 |
222 |
| -ms.reviewer: tapanm |
223 |
| -ms.date: 1/19/2021 |
224 |
| -ms.author: iawilt |
225 |
| -search.audienceType: |
226 |
| - - maker |
227 |
| -search.app: |
228 |
| - - PowerApps |
229 |
| ---- |
230 |
| - |
231 |
| -# Address input component |
232 |
| - |
233 |
| -Entering addresses can be frustrating and error-prone, particularly in mobile scenarios. |
234 |
| - |
235 |
| -The address input component lets you see dynamic address suggestions as you type. Using fuzzy matching logic, the component suggests multiple potential address matches that the user can select—making it quicker and easier to enter accurate addresses. |
236 |
| - |
237 |
| -The component returns the address as structured data, allowing your application to extract information like city, street, municipality, and even latitude and longitude. The data is in a format friendly to many locales and international address formats. |
238 |
| - |
239 |
| -To use the component, you need to [enable geospatial features for the environment](geospatial-overview.md#enable-the-geospatial-features-for-the-environment). |
240 |
| - |
241 |
| -Make sure you also [review the prerequisites for using geospatial components](geospatial-overview.md#prerequisites). |
242 |
| - |
243 |
| -## Use the component |
244 |
| - |
245 |
| -Insert the component into your app as you normally would for any other control or component. |
246 |
| - |
247 |
| -With an app open for editing in [Power Apps Studio](https://create.powerapps.com): |
248 |
| - |
249 |
| -1. Open the **Insert** tab. |
250 |
| - |
251 |
| -2. Expand **Input**. |
252 |
| - |
253 |
| -3. Select the component **Address input (preview)** to place it in the center of the app screen, or drag it to position it anywhere on the screen. |
254 |
| - |
255 |
| - |
256 |
| -You can modify the component by using many [properties](#input-properties). |
257 |
| - |
258 |
| -### Set a default search radius |
259 |
| - |
260 |
| -By default, the component will search around the user's ___location (providing the user has consented for the app to access their ___location). However, you can refine the default search area to help narrow or change initial results when users input an address. |
261 |
| - |
262 |
| -1. On the **Properties** pane, set the **Search within radius** switch to **On**. |
263 |
| - |
264 |
| -1. Enter a longitude, latitude, and radius (in meters). |
265 |
| - |
266 |
| -The component will start searching at the latitude and longitude, out to the distance specified in the radius field. |
267 |
| - |
268 |
| -### Use the map component with the input address component |
269 |
| - |
270 |
| -You can save addresses that a user inputs into the address component as a data collection. You can then retrieve these addresses and display them in [the map component](geospatial-component-map.md). |
271 |
| - |
272 |
| -1. App the map component and the input address component to your app. |
273 |
| -2. On the **Insert** menu, select **Button** and move it into your app. |
274 |
| -3. Go to the **Advanced** tab on the **Properties** pane. Under **OnSelect**, enter the following code: |
275 |
| - |
276 |
| - ```json |
277 |
| - If(IsBlank(AddressInput1.SearchResultJson), "", Collect(locations, {Latitude: AddressInput1.SelectedLatitude, Longitude: AddressInput1.SelectedLongitude})) |
278 |
| - ``` |
279 |
| - |
280 |
| - This code causes the button to save the current latitude and longitude to a collection named *locations*, as long as the search results are not blank |
281 |
| - |
282 |
| -  |
283 |
| - |
284 |
| -4. Select the map component, and go to the **Advanced** tab on the **Properties** pane. |
285 |
| - |
286 |
| -5. Set the following properties: |
287 |
| - |
288 |
| - - **Items** as *locations* |
289 |
| - - **ItemsLatitudes** as *"Latitude"* |
290 |
| - - **ItemsLongitudes** as *"Longitude"* |
291 |
| - |
292 |
| -Each time a user selects the button, the result from the address input component will be added to the map as a new pin. |
293 |
| - |
294 |
| -### Input properties |
295 |
| - |
296 |
| -The following properties are on the component's **Address Input** pane on the **Properties** and **Advanced** tabs. |
297 |
| - |
298 |
| - |
299 |
| - |
300 |
| -Some properties are only available on the **Advanced** tab, in the **More options** section. |
301 |
| - |
302 |
| -| Property | Description | Type | Location | |
303 |
| -| - | - | - | - | |
304 |
| -| Search result limit | The number of suggested addresses the component displays. | Integer | Properties | |
305 |
| -| Search within radius | Whether the component should suggest addresses within the user-defined **Radius** of the **Latitude** and **Longitude**. | Boolean | Properties | |
306 |
| -| Latitude | The latitude of the center point used to geo-bias address suggestions. Requires **Search within radius** to be on. | Decimal from –180 through 180 | Properties | |
307 |
| -| Longitude | The longitude of the center point used to geo-bias address suggestions. Requires **Search within radius** to be on. | Decimal from –180 through 180 | Properties | |
308 |
| -| Radius | The radius, in meters, around **Latitude** and **Longitude** to constrain the address suggestions. Requires **Search within radius** to be on. | Decimal | Properties | |
309 |
| -| Language | The language the address suggestions are returned in | String | Properties | |
310 |
| -| Country set | Comma-separated list of countries to constrain the address suggestions to, in ISO 3166 alpha-2 country codes. For example, **US, FR, KW** | String | Properties | |
311 |
| - |
312 |
| -### Output properties |
313 |
| - |
314 |
| -The component outputs various properties when a user interacts with it inside an app. You can use these outputs in other components or to customize the experience. |
315 |
| - |
316 |
| -The following table lists the output properties available. |
317 |
| - |
318 |
| -| Property | Description | |
319 |
| -| -- | -- | |
320 |
| -| UserInput | Text the user has typed in the input box. | |
321 |
| -| SelectedLatitude | Latitude of the user-selected address in the input field. | |
322 |
| -| SelectedLongitude | Longitude of the user-selected address in the input field. | |
323 |
| -| SearchResultJson | The search result (based on the UserInput property), displayed as a string in JSON format. | |
324 |
| -| FreeformAddress | Selected address from the list of suggested addresses. | |
325 |
| -| LocalName | An address component which represents the name of a geographic area or locality that groups multiple addressable objects for addressing purposes, without being an administrative unit. | |
326 |
| -| PostalCode | Postal code. | |
327 |
| -| ExtendedPostalCode | Extended Postal Code. | |
328 |
| -| CountryCode | Country code. | |
329 |
| -| Country | Country. | |
330 |
| -| CountryCodeISO3 | Country code in ISO alpha-3 format. | |
331 |
| -| CountrySubdivisionName | Country subdivision name. | |
332 |
| -| StreetName | Street name. | |
333 |
| -| StreetNumber | Street number. | |
334 |
| -| Municipality | Municipality. | |
335 |
| -| MunicipalitySubdivision | Municipality subdivision. | |
336 |
| -| CountryTertiarySubdivision | Country tertiary subdivision. | |
337 |
| -| CountrySecondarySubdivision | Country secondary subdivision. | |
338 |
| -| CountrySubdivision | Country subdivision. | |
339 |
| - |
340 |
| - |
341 |
| -### Additional (common) properties |
342 |
| - |
343 |
| -**[Default](./controls/properties-core.md)** – The initial value of a control before it's changed by the user. |
344 |
| - |
345 |
| -**[Text](./controls/properties-core.md)** – Text that appears on a control or that the user types into a control. |
346 |
| - |
347 |
| -**[BorderColor](./controls/properties-color-border.md)** – The color of a control's border. |
348 |
| - |
349 |
| -**BorderRadius** – The radius of a control's border. |
350 |
| - |
351 |
| -**[BorderStyle](./controls/properties-color-border.md)** – Whether a control's border is **Solid**, **Dashed**, **Dotted**, or **None**. |
352 |
| - |
353 |
| -**[BorderThickness](./controls/properties-color-border.md)** – The thickness of a control's border. |
354 |
| - |
355 |
| -**[Color](./controls/properties-color-border.md)** – The color of text in a control. |
356 |
| - |
357 |
| -**[DisplayMode](./controls/properties-core.md)** – Whether the control allows user input (**Edit**), only displays data (**View**), or is disabled (**Disabled**). |
358 |
| - |
359 |
| -**[DisabledBorderColor](./controls/properties-color-border.md)** – The color of a control's border if the control's **[DisplayMode](./controls/properties-core.md)** property is set to **Disabled**. |
360 |
| - |
361 |
| -**[DisabledColor](./controls/properties-color-border.md)** – The color of text in a control if its **[DisplayMode](./controls/properties-core.md)** property is set to **Disabled**. |
362 |
| - |
363 |
| -**[DisabledFill](./controls/properties-color-border.md)** – The background color of a control if its **[DisplayMode](./controls/properties-core.md)** property is set to **Disabled**. |
364 |
| - |
365 |
| -**[Fill](./controls/properties-color-border.md)** – The background color of a control. |
366 |
| - |
367 |
| -**[FocusedBorderColor](./controls/properties-color-border.md)** – The color of a control's border when the control is in focus. |
368 |
| - |
369 |
| -**[FocusedBorderThickness](./controls/properties-color-border.md)** – The thickness of a control's border when the control is in focus. |
370 |
| - |
371 |
| -**[Font](./controls/properties-text.md)** – The name of the family of fonts in which text appears. |
372 |
| - |
373 |
| -**[FontWeight](./controls/properties-text.md)** – The weight of the text in a control: **Bold**, **Semibold**, **Normal**, or **Lighter**. |
374 |
| - |
375 |
| -**[Height](./controls/properties-size-___location.md)** – The distance between a control's top and bottom edges. |
376 |
| - |
377 |
| -**Hint text** – Light-gray text that appears in an input-text control if it's empty. |
378 |
| - |
379 |
| -**[HoverBorderColor](./controls/properties-color-border.md)** – The color of a control's border when the user keeps the mouse pointer on that control. |
380 |
| - |
381 |
| -**[HoverColor](./controls/properties-color-border.md)** – The color of the text in a control when the user keeps the mouse pointer on it. |
382 |
| - |
383 |
| -**[HoverFill](./controls/properties-color-border.md)** – The background color of a control when the user keeps the mouse pointer on it. |
384 |
| - |
385 |
| -**[Italic](./controls/properties-text.md)** – Whether the text in a control is italic. |
386 |
| - |
387 |
| -**[LineHeight](./controls/properties-text.md)** – The vertical distance between lines of text—for example, between items in a list. |
388 |
| - |
389 |
| -**[OnChange](./controls/properties-core.md)** – How the app responds when the user changes the value of a control (for example, by adjusting a slider). |
390 |
| - |
391 |
| -**[PaddingBottom](./controls/properties-size-___location.md)** – The distance between text in a control and the bottom edge of that control. |
392 |
| - |
393 |
| -**[PaddingLeft](./controls/properties-size-___location.md)** – The distance between text in a control and the leftmost edge of that control. |
394 |
| - |
395 |
| -**[PaddingRight](./controls/properties-size-___location.md)** – The distance between text in a control and the rightmost edge of that control. |
396 |
| - |
397 |
| -**[PaddingTop](./controls/properties-size-___location.md)** – The distance between text in a control and the top edge of that control. |
398 |
| - |
399 |
| -**[PressedBorderColor](./controls/properties-color-border.md)** – The color of a control's border when the user taps or clicks that control. |
400 |
| - |
401 |
| -**[PressedColor](./controls/properties-color-border.md)** – The color of text in a control when the user taps or clicks that control. |
402 |
| - |
403 |
| -**[PressedFill](./controls/properties-color-border.md)** – The background color of a control when the user taps or clicks that control. |
404 |
| - |
405 |
| -**[Size](./controls/properties-text.md)** – The font size of the text that appears on a control. |
406 |
| - |
407 |
| -**[Strikethrough](./controls/properties-text.md)** – Whether a line appears through the text that appears on a control. |
408 |
| - |
409 |
| -**[TabIndex](./controls/properties-accessibility.md)** – Keyboard navigation order in relation to other controls. |
410 |
| - |
411 |
| -**[Tooltip](./controls/properties-core.md)** – Explanatory text that appears when the user hovers over a control. |
412 |
| - |
413 |
| -**[Underline](./controls/properties-text.md)** – Whether a line appears under the text that appears on a control. |
414 |
| - |
415 |
| -**[Visible](./controls/properties-core.md)** – Whether a control appears or is hidden. |
416 |
| - |
417 |
| -**[Width](./controls/properties-size-___location.md)** – The distance between a control's leftmost and rightmost edges. |
418 |
| - |
419 |
| -**[X](./controls/properties-size-___location.md)** – The distance between the leftmost edge of a control and the leftmost edge of its parent container (or screen, if the control has no parent container). |
420 |
| - |
421 |
| -**[Y](./controls/properties-size-___location.md)** – The distance between the top edge of a control and the top edge of the parent container (or screen, if the control has no parent container). |
422 |
| - |
423 |
| -## Other geospatial components |
424 |
| - |
425 |
| -To visualize and interpret ___location data, use the **[Interactive map](geospatial-component-map.md)** component. |
426 |
| - |
427 | 212 |
|
428 | 213 | [!INCLUDE[footer-include](../../includes/footer-banner.md)]
|
429 | 214 |
|
0 commit comments