From 87765664760045489cdf01f5f9a97b5fa50e246f Mon Sep 17 00:00:00 2001 From: chanywa Date: Wed, 31 May 2017 15:32:57 +0900 Subject: [PATCH] Fix to set origin and destination when routing with waypoints Change-Id: If8be83961d928dd50ab3ae0b1f8c8ba536581fd4 --- maps-plugin-here.changes | 5 +++++ packaging/maps-plugin-here.spec | 2 +- src/here_route.cpp | 7 +++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/maps-plugin-here.changes b/maps-plugin-here.changes index 96316db..038cf23 100644 --- a/maps-plugin-here.changes +++ b/maps-plugin-here.changes @@ -1,3 +1,8 @@ +[Version] maps-plugin-here_0.3.22 +[Date] 31 May 2017 +[Title] Fix to set origin and destination when routing with waypoints. +[Developer] Seechan Kim + [Version] maps-plugin-here_0.3.21 [Date] 21 Apr 2017 [Title] Adds app id of XamarinFormsMaps.Tests diff --git a/packaging/maps-plugin-here.spec b/packaging/maps-plugin-here.spec index 60a8920..8408684 100644 --- a/packaging/maps-plugin-here.spec +++ b/packaging/maps-plugin-here.spec @@ -1,6 +1,6 @@ Name: maps-plugin-here Summary: Tizen HERE Maps Plug-in Library -Version: 0.3.21 +Version: 0.3.22 Release: 1 Group: Location/Libraries License: Apache-2.0 and HERE diff --git a/src/here_route.cpp b/src/here_route.cpp index 8ea6c75..20f4392 100644 --- a/src/here_route.cpp +++ b/src/here_route.cpp @@ -108,6 +108,13 @@ here_error_e HereRoute::PrepareWaypoint(const maps_coordinates_h* hWaypointList, m_pQuery->SetWaypoints(hereCoordList); + /* Set origin and destination with the first and last elements of coordinates list. */ + maps_coordinates_destroy(m_aOriginCoord); + maps_coordinates_destroy(m_aDestinationCoord); + + maps_coordinates_clone(hWaypointList[0], &m_aOriginCoord); + maps_coordinates_clone(hWaypointList[nWaypointNum-1], &m_aDestinationCoord); + return HERE_ERROR_NONE; } -- 2.7.4