INNER CODE UNIT · JavaScript
searchAddressSuggest
genular/pandora · src/app/api/backend/index.js:174
export function searchAddressSuggest(input, app_code, app_id) {
return request({
url: "http://places.cit.api.here.com/places/v1/suggest?app_code=" + app_code + "&app_id=" + app_id + "&pretty=true&q=" + encodeURIComponent(input),
method: "GET",
headers: { "X-Map-Viewport": "13.3704,52.5122,13.4194,52.5262" },
});
}
export function searchAddressDetails(input, app_code, app_id) {
return request({
url:
"https://geocoder.cit.api.here.com/6.2/geocode.json?searchtext=" +
encodeURIComponent(input) +
"&app_id=" +
app_id +
"&app_code=" +
app_code +
"&gen=9&jsonattributes=1&locationattributes=address&maxresults=1&addressattributes=country,city,postalCode,addressLines&language=en-US",