Search code examples
dictionarylocationmapsgeocodinghere-api

In Here Map - How to search a list of address


I know how to get a location for one address, by example

function geocode(platform) {
            var geocoder = platform.getSearchService(),
                geocodingParameters = {
                    q:'Place  Armes, 78000 Versailles, Francia'                                                         
                };
            geocoder.geocode(
                geocodingParameters,
                onSuccess,
                onError
            );
        }

But if I have a list of address, ¿I need to call n times the same function with diferent q parameter? or exists any way to send a list of addresses in one call?


Solution

  • You can send a list of addresses with the Batch Geocoder API. The list of addresses go into the body of a POST request. See the Batch Geocoder API Guide for request construction details.

    With the regular Geocoder API, you indeed need to send as many requests as you have addresses.