I'm using Here API Calculate Route to get the route between two locations. What I need is to restrict the route to be only within some given country (Brazil, in my case).
Is there a way to achieve this?
There is a parameter to exclude countries. It takes a list of ISO 3166-1-alpha-3 country codes, like that:
excludeCountries=BOL,PRY,URY
Granted, your question is more the other way around, i.e. how to include only specific countries, but as far as I know there is no such parameter, and I assume you can work around by listing all neighbor countries to the excludeCountries
parameter.
Source: API Reference