0

Hellos,

I gave up on using Google Places due to the cost and decided to go with here geocode api. I started using Places Search API which works pretty great but does not return the lat and lng.

So my solution is as follows

  1. Get location Ids from the Search API
  2. Call the geocode api by locationId to get the lat and lng

This solution works but is obviously slow. So my question here is

  1. Is there a way to get multiple locationIds in one geocode call?
  2. Is there a better service out there that is as accurate and can return lat and lng as well?

Cheers

user3052526
  • 681
  • 10
  • 24

1 Answers1

0

Please use Autosuggest instead of Places Search API.

You can find below field in Autosuggest API

  "title": "restaurant",
  "highlightedTitle": "<b>rest</b>aurant",
  "category": "restaurant",
  "href": "https://...",
  "type": "urn:nlp-types:search",
  "resultType":"category"

Sample image enter image description here

Vivek
  • 4,916
  • 35
  • 40
  • The problem with autosuggest is that it requires the Lng and Lat in the query – user3052526 Mar 04 '19 at 22:27
  • It is the location context which is needed. You can also e.g. use a BoundingBox. Here you can find also some further explanation and a best practice chapter: https://developer.here.com/documentation/places/topics/location-contexts.html –  Mar 05 '19 at 09:46
  • @user3052526 You can pass your current location in requires lat long. – Vivek Mar 12 '19 at 07:17
  • @Vivek i am trying to get a list of places as an autocomplete feature passing my location will not help – user3052526 Mar 13 '19 at 04:37
  • @user3052526 you can use another method like [Suggest Entrypoint](https://developer.here.com/documentation/places/topics_api/resource-suggest.html)'' Please read full document in provided link. – Vivek Mar 25 '19 at 06:12