Here Maps route : get crossed cities
Hello guys!
I'm actually using Here to provide Maps. I'm actually using the routing calculate to calculate de distance between, duration and cities crossed two points. The problem is that the results don't contain any pieces of information about the crossed places.
My Question:
How can I get the crossed Cities / Districts / Countries?
Here is an example:
I made this request here:
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={app_id}&app_code={app_code}&mode=balanced;car;traffic:disabled&waypoint0=geo!48.13642,11.57755&waypoint1=geo!49.45435,11.0735&departure=2018-11-21T10:59:30.640Z&alternatives=5&routeAttributes=routeId&language=fr
And the result was showing something with 26 legs in the route.
Ideas:
One idea was to go through all the Legs and find out which cities they belong to using another API, as those Legs contains Maneuver, which contains Position which is coordinate, but for me, it's too many resources used.
Another Idea was to find out a way of adding metadata about it directly from the request but I didn't find anything about it in the documentation.
So I don't know yet what to do. Any help would be great!
Thanks for reading.
maps

add a comment |
Hello guys!
I'm actually using Here to provide Maps. I'm actually using the routing calculate to calculate de distance between, duration and cities crossed two points. The problem is that the results don't contain any pieces of information about the crossed places.
My Question:
How can I get the crossed Cities / Districts / Countries?
Here is an example:
I made this request here:
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={app_id}&app_code={app_code}&mode=balanced;car;traffic:disabled&waypoint0=geo!48.13642,11.57755&waypoint1=geo!49.45435,11.0735&departure=2018-11-21T10:59:30.640Z&alternatives=5&routeAttributes=routeId&language=fr
And the result was showing something with 26 legs in the route.
Ideas:
One idea was to go through all the Legs and find out which cities they belong to using another API, as those Legs contains Maneuver, which contains Position which is coordinate, but for me, it's too many resources used.
Another Idea was to find out a way of adding metadata about it directly from the request but I didn't find anything about it in the documentation.
So I don't know yet what to do. Any help would be great!
Thanks for reading.
maps

add a comment |
Hello guys!
I'm actually using Here to provide Maps. I'm actually using the routing calculate to calculate de distance between, duration and cities crossed two points. The problem is that the results don't contain any pieces of information about the crossed places.
My Question:
How can I get the crossed Cities / Districts / Countries?
Here is an example:
I made this request here:
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={app_id}&app_code={app_code}&mode=balanced;car;traffic:disabled&waypoint0=geo!48.13642,11.57755&waypoint1=geo!49.45435,11.0735&departure=2018-11-21T10:59:30.640Z&alternatives=5&routeAttributes=routeId&language=fr
And the result was showing something with 26 legs in the route.
Ideas:
One idea was to go through all the Legs and find out which cities they belong to using another API, as those Legs contains Maneuver, which contains Position which is coordinate, but for me, it's too many resources used.
Another Idea was to find out a way of adding metadata about it directly from the request but I didn't find anything about it in the documentation.
So I don't know yet what to do. Any help would be great!
Thanks for reading.
maps

Hello guys!
I'm actually using Here to provide Maps. I'm actually using the routing calculate to calculate de distance between, duration and cities crossed two points. The problem is that the results don't contain any pieces of information about the crossed places.
My Question:
How can I get the crossed Cities / Districts / Countries?
Here is an example:
I made this request here:
https://route.api.here.com/routing/7.2/calculateroute.json?app_id={app_id}&app_code={app_code}&mode=balanced;car;traffic:disabled&waypoint0=geo!48.13642,11.57755&waypoint1=geo!49.45435,11.0735&departure=2018-11-21T10:59:30.640Z&alternatives=5&routeAttributes=routeId&language=fr
And the result was showing something with 26 legs in the route.
Ideas:
One idea was to go through all the Legs and find out which cities they belong to using another API, as those Legs contains Maneuver, which contains Position which is coordinate, but for me, it's too many resources used.
Another Idea was to find out a way of adding metadata about it directly from the request but I didn't find anything about it in the documentation.
So I don't know yet what to do. Any help would be great!
Thanks for reading.
maps

maps

asked Nov 21 '18 at 11:35


Selast LambouSelast Lambou
507
507
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
There is no direct way to request this from the Routing service. But there are different possibilities to request further deatails around the route itself:
routeAttributes - Defines which attributes are included in the response as part of the data representation of the route.
legAttributes - Defines which attributes are included in the response as part of the data representation of the route legs.
maneuverAttributes - Defines which attributes are included in the response as part of the data representation of the route
maneuvers.
linkAttributes - Defines which attributes are included in the response as part of the data representation of the route links.
See also here https://developer.here.com/documentation/routing/topics/resource-calculate-route.html
Maybe you can find here the right combination for your use case.
In anyway the Router offers the a summary by country:
&routeattributes=sc
For example (I extended a bit your example to cross a country border):
"summary": {
"distance": 365910,
"trafficTime": 15369,
"baseTime": 14261,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 366 km, durée: 3h58.",
"travelTime": 14261,
"_type": "RouteSummaryType"
},
"summaryByCountry": [{
"distance": 107955,
"trafficTime": 5821,
"baseTime": 5347,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea"],
"text": "Distance du trajet: 108 km, durée: 1h29.",
"travelTime": 5347,
"country": "AUT",
"tollRoadDistance": 94321,
"_type": "RouteSummaryByCountryType"
}, {
"distance": 257955,
"trafficTime": 9548,
"baseTime": 8914,
"flags": ["motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 258 km, durée: 2h29.",
"travelTime": 8914,
"country": "DEU",
"_type": "RouteSummaryByCountryType"
}]
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53411216%2fhere-maps-route-get-crossed-cities%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
There is no direct way to request this from the Routing service. But there are different possibilities to request further deatails around the route itself:
routeAttributes - Defines which attributes are included in the response as part of the data representation of the route.
legAttributes - Defines which attributes are included in the response as part of the data representation of the route legs.
maneuverAttributes - Defines which attributes are included in the response as part of the data representation of the route
maneuvers.
linkAttributes - Defines which attributes are included in the response as part of the data representation of the route links.
See also here https://developer.here.com/documentation/routing/topics/resource-calculate-route.html
Maybe you can find here the right combination for your use case.
In anyway the Router offers the a summary by country:
&routeattributes=sc
For example (I extended a bit your example to cross a country border):
"summary": {
"distance": 365910,
"trafficTime": 15369,
"baseTime": 14261,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 366 km, durée: 3h58.",
"travelTime": 14261,
"_type": "RouteSummaryType"
},
"summaryByCountry": [{
"distance": 107955,
"trafficTime": 5821,
"baseTime": 5347,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea"],
"text": "Distance du trajet: 108 km, durée: 1h29.",
"travelTime": 5347,
"country": "AUT",
"tollRoadDistance": 94321,
"_type": "RouteSummaryByCountryType"
}, {
"distance": 257955,
"trafficTime": 9548,
"baseTime": 8914,
"flags": ["motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 258 km, durée: 2h29.",
"travelTime": 8914,
"country": "DEU",
"_type": "RouteSummaryByCountryType"
}]
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
add a comment |
There is no direct way to request this from the Routing service. But there are different possibilities to request further deatails around the route itself:
routeAttributes - Defines which attributes are included in the response as part of the data representation of the route.
legAttributes - Defines which attributes are included in the response as part of the data representation of the route legs.
maneuverAttributes - Defines which attributes are included in the response as part of the data representation of the route
maneuvers.
linkAttributes - Defines which attributes are included in the response as part of the data representation of the route links.
See also here https://developer.here.com/documentation/routing/topics/resource-calculate-route.html
Maybe you can find here the right combination for your use case.
In anyway the Router offers the a summary by country:
&routeattributes=sc
For example (I extended a bit your example to cross a country border):
"summary": {
"distance": 365910,
"trafficTime": 15369,
"baseTime": 14261,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 366 km, durée: 3h58.",
"travelTime": 14261,
"_type": "RouteSummaryType"
},
"summaryByCountry": [{
"distance": 107955,
"trafficTime": 5821,
"baseTime": 5347,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea"],
"text": "Distance du trajet: 108 km, durée: 1h29.",
"travelTime": 5347,
"country": "AUT",
"tollRoadDistance": 94321,
"_type": "RouteSummaryByCountryType"
}, {
"distance": 257955,
"trafficTime": 9548,
"baseTime": 8914,
"flags": ["motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 258 km, durée: 2h29.",
"travelTime": 8914,
"country": "DEU",
"_type": "RouteSummaryByCountryType"
}]
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
add a comment |
There is no direct way to request this from the Routing service. But there are different possibilities to request further deatails around the route itself:
routeAttributes - Defines which attributes are included in the response as part of the data representation of the route.
legAttributes - Defines which attributes are included in the response as part of the data representation of the route legs.
maneuverAttributes - Defines which attributes are included in the response as part of the data representation of the route
maneuvers.
linkAttributes - Defines which attributes are included in the response as part of the data representation of the route links.
See also here https://developer.here.com/documentation/routing/topics/resource-calculate-route.html
Maybe you can find here the right combination for your use case.
In anyway the Router offers the a summary by country:
&routeattributes=sc
For example (I extended a bit your example to cross a country border):
"summary": {
"distance": 365910,
"trafficTime": 15369,
"baseTime": 14261,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 366 km, durée: 3h58.",
"travelTime": 14261,
"_type": "RouteSummaryType"
},
"summaryByCountry": [{
"distance": 107955,
"trafficTime": 5821,
"baseTime": 5347,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea"],
"text": "Distance du trajet: 108 km, durée: 1h29.",
"travelTime": 5347,
"country": "AUT",
"tollRoadDistance": 94321,
"_type": "RouteSummaryByCountryType"
}, {
"distance": 257955,
"trafficTime": 9548,
"baseTime": 8914,
"flags": ["motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 258 km, durée: 2h29.",
"travelTime": 8914,
"country": "DEU",
"_type": "RouteSummaryByCountryType"
}]
There is no direct way to request this from the Routing service. But there are different possibilities to request further deatails around the route itself:
routeAttributes - Defines which attributes are included in the response as part of the data representation of the route.
legAttributes - Defines which attributes are included in the response as part of the data representation of the route legs.
maneuverAttributes - Defines which attributes are included in the response as part of the data representation of the route
maneuvers.
linkAttributes - Defines which attributes are included in the response as part of the data representation of the route links.
See also here https://developer.here.com/documentation/routing/topics/resource-calculate-route.html
Maybe you can find here the right combination for your use case.
In anyway the Router offers the a summary by country:
&routeattributes=sc
For example (I extended a bit your example to cross a country border):
"summary": {
"distance": 365910,
"trafficTime": 15369,
"baseTime": 14261,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 366 km, durée: 3h58.",
"travelTime": 14261,
"_type": "RouteSummaryType"
},
"summaryByCountry": [{
"distance": 107955,
"trafficTime": 5821,
"baseTime": 5347,
"flags": ["dirtRoad", "tollroad", "noThroughRoad", "tunnel", "motorway", "builtUpArea"],
"text": "Distance du trajet: 108 km, durée: 1h29.",
"travelTime": 5347,
"country": "AUT",
"tollRoadDistance": 94321,
"_type": "RouteSummaryByCountryType"
}, {
"distance": 257955,
"trafficTime": 9548,
"baseTime": 8914,
"flags": ["motorway", "builtUpArea", "park"],
"text": "Distance du trajet: 258 km, durée: 2h29.",
"travelTime": 8914,
"country": "DEU",
"_type": "RouteSummaryByCountryType"
}]
answered Dec 3 '18 at 13:52


HERE Developer SupportHERE Developer Support
1,6721610
1,6721610
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
add a comment |
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
Thank you! It was accurate as an answer.
– Selast Lambou
Dec 26 '18 at 10:16
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53411216%2fhere-maps-route-get-crossed-cities%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown