0

Is it possible to return the common (geographic) city name results for AutoComplete instead of or in addition to the post office city?

For example, there are 37 cities served by the Minneapolis, MN Post Office. All of them will return results using Minneapolis as the city, instead of the geographic city.

I guess I could do a reverse geocode based on the first result and insert them into the AutoComplete results. But checking if something is built-in. Thanks.

Edit: I guess the reverse-geocode returns the same Postal City, not the Geographic City.

Here is example address: 10611 Baltimore St NE Ste 100 Blaine, MN 55449

James
  • 46
  • 3
  • Could you share the exact API call used? So, we can have a further check. –  Jul 13 '20 at 03:20
  • I am using: https://autosuggest.search.hereapi.com/v1/autosuggest – James Jul 13 '20 at 20:19
  • Running https://autosuggest.search.hereapi.com/v1/autosuggest?at=45.01022,-93.28824&limit=5&q=10611 Baltimore St NE Ste 100 Blaine, MN 55449&apiKey=[apiKey], will give "city": "Blaine". So, do you want the city returned as "Minneapolis" instead? –  Jul 14 '20 at 01:07
  • Sorry. I may have been unclear. I am performing autosuggest queries for each character typed, so `10611 Baltimore St NE Ste 100` will return Minneapolis until you start typing the `B` in `Blaine`. I would like to see Blaine appear instead of Minneapolis or in addition to the Minneapolis result without having to to include. Blaine in the query. – James Jul 14 '20 at 11:53
  • The use case is a new customer form. The issue is, an employee will ask for the street address and type in 10611 Baltimore St. They will see the Minneapolis suggestion appear. In this example, it is the only result returned (and never the geographic result). When the customer says their city name is Blaine, the employee's presumption is, the suggested result is incorrect. So they choose to type the city name manually. – James Jul 14 '20 at 12:09
  • Likewise if I use revgeocode for the coordinates `https://revgeocode.search.hereapi.com/v1/revgeocode?at=45.1627955,-93.2331431,17&lang=en_US&apiKey=`, I will also get Minneapolis instead of the geographic city, Blaine. – James Jul 14 '20 at 12:15
  • Thanks for providing the info. Indeed the city names are different. This will need a check from development team. Will feedback with their findings later. –  Jul 15 '20 at 02:12
  • Thank you for your time. This also affects the [City of St. Paul](https://www.postallocations.com/mn/city/saint-paul). – James Jul 15 '20 at 12:58

1 Answers1

0

Solution is to not use here.com and instead use ArcGIS findAddressCandidates API endpoint.

The URL Request parameter preferredLabelValues can be set to localCity instead of postalCity

https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find-address-candidates.htm

James
  • 46
  • 3