Select to view content in your preferred language

How to use 2 Fields for locating an address using AGSLocatorTask

539
1
08-01-2022 01:44 AM
AfrozAlam
New Contributor III

I am developing an application for Locating a Villa in a compound. The One line address is combination of BUILDING_NO, STREET_NO, ZONE_NO named as QARS. The application is working fine to locate the QARS (Single Field). But I want to locate a particular Villa (UNIT_NO) in same QARS. 

It would be very much appreciated if some help in this regard. 

Code, URLs of GeocodeServer & MapServer and Screenshot are attached for ready reference.

Thanks & regards,

Afroz Alam

Afroz Alam
0 Kudos
1 Reply
Nicholas-Furness
Esri Regular Contributor

A lot will depend on how your locator is configured (you might be able to configure it to accommodate the Unit Name as part of the address - I'm not familiar with creating locators). You could also use the geocodeWithSearchValues() override and specify individual address attributes you want to search on. You can see the list of attributes your locator supports by looking at the AGSLocatorTask.locatorInfo.searchAttributes array (the locator will need to be loaded before you can read this metadata).

0 Kudos