Here maps Getting attractions / places aling route - here-api

I am using the Routing service to get the route between two points. I would like to return attractions or places along or near the route, if possible. I have searched but unable to find anything that looks like it does what I need.

You can use the browse end point for the same. This endpoint provides search results for places based on different filters, such as categories or name, ranked by distance from a given search center. The only mandatory elements exposed in the response are id and position. The other elements shown in the response samples section are only dataset attributes suggestions.
https://browse.search.hereapi.com/v1/browse
For more details please check below doc. https://developer.here.com/documentation/geocoding-search-api/dev_guide/index.html

Related

Zip Codes along driving route

I know that there is a Google API that can provide directions and/or driving distance between 2 points.
Is there a way to get all of the zip codes that the route passes through, or within a specified distance from the route?
The application has to do with deliveries. E.G. a truck is making a delivery from point A to point B. I would like to get all of the zip codes along the route in order to determine which other deliveries can be done in the same trip.
I've only found one post for something similar, but it's old, the links aren't valid any more and I would think there is something else out there.

Here Maps 'segmentRef' attribute explanation

Can someone explain/point to documentation that explains the 'segmentRef' attribute that gets returned by the Here Routing API v8 when spans="segmentRef". An example of what gets returned is shown below. The middle part seems to be the topologyID but I can't figure out the rest. Thanks.
$0:321534451:$1:457679505#-0..0.7675126869621484
In v8, segmentRef is returned instead of PVID. spans conceptually replace link attributes.
Please refer the screenshots of supported link attributes.
For more details please refer the below api guide.
https://developer.here.com/documentation/routing-api/migration_guide/index.html
segmentRef is a parameter used in the HERE Maps API to identify a specific segment of a route. The segmentRef parameter is used to reference a specific segment within the route, and can be used in conjunction with the HERE Routing API to retrieve information about that segment. The information that can be retrieved for a segment includes details such as the start and end coordinates, the length of the segment, and the type of road along which the segment is located.
The segmentRef parameter is typically used in conjunction with other parameters, such as origin and destination, to define the overall route and retrieve information about specific segments within that route.

Is there a way to show District using Places autosuggest entry point?

Im using the places v1 autosuggest entry point, with the following request
https://places.api.here.com/places/v1/autosuggest?app_id=APP_ID&app_code=APP_CODE&q=550+5e+avenue&at=45.44569010000001%2C-73.66412120000001&size=5&result_types=address%2Cplace&addressFilter=countryCode%3Dca
So basically Im searching within Canada for places and address. The address Im looking for is in Montreal however there are two districts with that address, Verdun, and Lachine, however in the response there is no way to differentiate them without visiting the href to go to the full places details. Is there a way to display the district so its possible to differentiate the results?
Notice that the endpoint of 'autosuggest' does not support this district field.
However the 'search' endpoint shows the district. YOu an use this one instead.
See: https://developer.here.com/documentation/places/topics_api/media-type-search.html

How to find all places, which belong to a category like atms in an area, which is defined according to a radius or some latitutes and longtitutes?

I have to get all places, which belongs to a category like restaurants, atms, hospitals in an area according to a radius or some latitutes and longtitutes, which is defined by the user. As an example, imagine I want to get all the ATMs in an area. This area must be abled to define for the user. I want to get all these atms in that defined area. I couldn't find a query in APIs to fulfill my requirement. Can you please help me to do this?
I tried Google places api to do this. Following is one of a query I tried.
https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=6.927079,79.861244&radius=1500&type=atm&key=YOUR_API_KEY
I couldn't get all atms using this query. The output was limited in this case.
And I also tried Places (Search) API in Here Maps. But I couldn't find a way to fulfill my requirement.
Maybe the manual is misleading. It says that a query is required, but you can actually just do a browse/ query without a 'q' if a 'cat' is specified and you'll get all of the responses with that category near your 'at' (or restricted to your 'in'), sorted by distance.
So, to get 50 ATMs near the center of San Francisco, you can use a query like https://places.api.here.com/places/v1/browse?at=37.7672%2C-122.4425&cat=700-7010-0108&size=50&cs=pds...
For restaurants, it's a bit more complicated since there are many different kinds of restaurants and they all won't necessarily have the "Restaurant" category. Some might only have "Fine Dining", for example. But 'cat' can be a comma-separated list of categories, so the user can specify all of the subtypes to make sure they get all of them.
You need to set cs=pds and use the category ids from the places-category-system documentation reference below, so if users are typing in category names you'll have to do some transformation in your code. If you are interested in looking for specific types of restaurants like Chinese or Italian, there's a set of food types that can also be put in the 'cat' parameter (ids need to be used there as well)
https://developer.here.com/documentation/places/topics_api/resource-browse.html
https://developer.here.com/documentation/places/topics/place_categories/places-category-system.html
https://developer.here.com/documentation/places/topics/place_categories/food-types-category-system.html

How to fetch exactly same results of Google Grocery stores near to me

I am wondering to find a way to fetch exactly similar results of google grocery stores near to me
I have used the below API to get nearby grocery stores
https://maps.googleapis.com/maps/api/place/nearbysearch/json?sensor=true&radius=5000&key=AIzaSyC9rFJ90pP1oHpLrqpR2B0HtUboLaHmnDw&location=45.4940475,-73.5606149&type=supermarket&rankby=prominence
but it's not showing the all popular stores with matching to google grocery stores near to me best match (attached images).
What is the way to achieve functionality by applying filters From API? please, advice appreciated if its possible immediate replay.
Thanks
The API only will gather data by distance, prominence, and type. It is up to you how you want the data be sorted/filtered and which to display to your users.
Get your data: rankby
If rankby=distance (described under Optional parameters below) is
specified, then one or more of keyword, name, or type is required.
If you want to rank by distance, you will need to remove radius parameter form your url.
radius — Defines the distance (in meters) within which to return place
results. The maximum allowed radius is 50 000 meters. Note that radius
must not be included if rankby=distance (described under Optional
parameters below) is specified.
This will get you started. Places Library

Resources