fixed to apply realtime for route query & a svace defect 17/67217/1 accepted/tizen/common/20160427.144214 accepted/tizen/ivi/20160428.002555 accepted/tizen/mobile/20160428.004714 accepted/tizen/tv/20160428.002406 accepted/tizen/wearable/20160428.002627 submit/tizen/20160427.074633
authorchanywa <cbible.kim@samsung.com>
Tue, 26 Apr 2016 01:59:28 +0000 (10:59 +0900)
committerchanywa <cbible.kim@samsung.com>
Tue, 26 Apr 2016 01:59:28 +0000 (10:59 +0900)
Change-Id: I88fb7a500ca3dbe10fc98b4f47b01fc0befec169

13 files changed:
inc/engine/maps/GeoTiledMap.h
inc/engine/routes/GeoRoute.h
inc/engine/routes/GeoRouteQuery.h
lib/aarch64/libheremaps-engine.so.1
lib/aarch64/libheremaps-engine.so.1.0.6_12 [moved from lib/aarch64/libheremaps-engine.so.1.0.6_11 with 66% similarity, mode: 0755]
lib/arm/libheremaps-engine.so.1
lib/arm/libheremaps-engine.so.1.0.6_12 [moved from lib/arm/libheremaps-engine.so.1.0.6_11 with 64% similarity, mode: 0755]
lib/i586/libheremaps-engine.so.1
lib/i586/libheremaps-engine.so.1.0.6_12 [moved from lib/i586/libheremaps-engine.so.1.0.6_11 with 64% similarity, mode: 0755]
lib/x86_64/libheremaps-engine.so.1
lib/x86_64/libheremaps-engine.so.1.0.6_12 [moved from lib/x86_64/libheremaps-engine.so.1.0.6_11 with 66% similarity, mode: 0755]
src/here_route.cpp
src/here_view.cpp

index acf274e..bae3e36 100755 (executable)
@@ -157,24 +157,42 @@ public:
     
     /**
      * This method retrieves the map zoom level.
-     * 
+     *
      * @return A value indicating the new zoom level.
      */
     double GetZoomLevel() const;
     
     /**
      * This method retrieves the minimum map zoom level.
-     * 
+     *
      * @return A value indicating the minimum map zoom level.
      */
     double GetMinimumZoomLevel() const;
     
+#ifdef TIZEN_CUSTOMIZATION
+    /**
+     * This method sets the minimum map zoom level.
+     *
+     * @return A value indicating the minimum map zoom level.
+     */
+    void SetMinimumZoomLevel(double zoom);
+#endif
+
     /**
      * This method retrieves the maximum map zoom level.
-     * 
+     *
      * @return A value indicating the maximum map zoom level.
      */
     double GetMaximumZoomLevel() const;
+
+#ifdef TIZEN_CUSTOMIZATION
+    /**
+     * This method sets the maximum map zoom level.
+     *
+     * @return A value indicating the maximum map zoom level.
+     */
+    void SetMaximumZoomLevel(double zoom);
+#endif
    
     /**
      * This method pans the map the caller-specified number of pixels
index 26266cf..7997a9f 100755 (executable)
@@ -175,6 +175,26 @@ public:
      */
     int GetTravelTime() const;
 
+#ifdef TIZEN_MIGRATION
+    /**
+     * This method sets a class property that holds the time required to traffic
+     * the length of the route.
+     *
+     * @param aSecs An integer value specifying the time required to traffic the
+     *        length of the route in seconds.
+     */
+    void SetTrafficTime(int aSecs);
+
+    /**
+     * This method retrieves the value of a class property that holds the time
+     * required to traffic the length of the route.
+     *
+     * @return An integer value specifying the time required to traffic the
+     *        length of the route in seconds.
+     */
+    int GetTrafficTime() const;
+#endif
+
     /**
      * This method sets a class property that holds the length of the route --
      * the total distance to travel between the start and end points of the
index ab41f7b..2c18a40 100755 (executable)
@@ -357,6 +357,20 @@ public:
      * @return An integer indicating the maximum number of results to be retrieved.
      */
     size_t GetAlternatives(void) const;
+
+    /**
+     * This method sets a value that indicates the realtime traffic status.
+     *
+     * @param uAlternatives An integer indicating the realtime traffic status.
+     */
+    void SetRealtimeTraffic(size_t uTraffic);
+
+    /**
+     * This method retrieves a value that indicates the realtime traffic status.
+     *
+     * @return An integer indicating the realtime traffic status.
+     */
+    size_t GetRealtimeTraffic(void) const;
 #endif
 
     /**
index fec6485..0f3e16b 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_11
\ No newline at end of file
+libheremaps-engine.so.1.0.6_12
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
similarity index 66%
rename from lib/aarch64/libheremaps-engine.so.1.0.6_11
rename to lib/aarch64/libheremaps-engine.so.1.0.6_12
index 6f8601f..36020d6
Binary files a/lib/aarch64/libheremaps-engine.so.1.0.6_11 and b/lib/aarch64/libheremaps-engine.so.1.0.6_12 differ
index fec6485..0f3e16b 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_11
\ No newline at end of file
+libheremaps-engine.so.1.0.6_12
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
similarity index 64%
rename from lib/arm/libheremaps-engine.so.1.0.6_11
rename to lib/arm/libheremaps-engine.so.1.0.6_12
index f629cd7..8353ac0
Binary files a/lib/arm/libheremaps-engine.so.1.0.6_11 and b/lib/arm/libheremaps-engine.so.1.0.6_12 differ
index fec6485..0f3e16b 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_11
\ No newline at end of file
+libheremaps-engine.so.1.0.6_12
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
similarity index 64%
rename from lib/i586/libheremaps-engine.so.1.0.6_11
rename to lib/i586/libheremaps-engine.so.1.0.6_12
index d675ff7..91d13e7
Binary files a/lib/i586/libheremaps-engine.so.1.0.6_11 and b/lib/i586/libheremaps-engine.so.1.0.6_12 differ
index fec6485..0f3e16b 120000 (symlink)
@@ -1 +1 @@
-libheremaps-engine.so.1.0.6_11
\ No newline at end of file
+libheremaps-engine.so.1.0.6_12
\ No newline at end of file
old mode 100644 (file)
new mode 100755 (executable)
similarity index 66%
rename from lib/x86_64/libheremaps-engine.so.1.0.6_11
rename to lib/x86_64/libheremaps-engine.so.1.0.6_12
index 4faabee..70b236d
Binary files a/lib/x86_64/libheremaps-engine.so.1.0.6_11 and b/lib/x86_64/libheremaps-engine.so.1.0.6_12 differ
index 4c17585..f166c7a 100644 (file)
@@ -193,6 +193,24 @@ here_error_e HereRoute::PreparePreference(maps_preference_h hPref)
                }
        }
 
+       char *szRealtimeTraffic;
+       if (maps_preference_get(hPref, MAPS_ROUTE_REALTIME_TRAFFIC, &szRealtimeTraffic) == MAPS_ERROR_NONE)
+       {
+               if (!strcmp(szRealtimeTraffic, "true") || !strcmp(szRealtimeTraffic, "enabled"))
+               {
+                       m_pQuery->SetRealtimeTraffic(1);
+               }
+               else if (!strcmp(szRealtimeTraffic, "false") || !strcmp(szRealtimeTraffic, "disabled"))
+               {
+                       m_pQuery->SetRealtimeTraffic(2);
+               }
+               else
+               {
+                       m_pQuery->SetRealtimeTraffic(0);
+               }
+               g_free(szRealtimeTraffic);
+       }
+
        return HERE_ERROR_NONE;
 }
 
@@ -208,7 +226,7 @@ here_error_e HereRoute::StartRoute(void)
 
 void HereRoute::OnRouteReply(const GeoRouteReply& Reply)
 {
-       if (m_bCanceled || !m_pCbFunc) // ignore call back if it was cancelled.
+       if (m_bCanceled || !m_pCbFunc || !m_pQuery) // ignore call back if it was cancelled.
        {
                delete this;
                return;
@@ -246,7 +264,11 @@ void HereRoute::OnRouteReply(const GeoRouteReply& Reply)
                        maps_route_set_distance_unit(mapsRoute, m_eDistanceUnit);
 
                        /* duration */
-                       maps_route_set_total_duration(mapsRoute, hereRoute->GetTravelTime());
+                       if (m_pQuery->GetRealtimeTraffic() == 1)
+                               maps_route_set_total_duration(mapsRoute, hereRoute->GetTrafficTime());
+                       else
+                               maps_route_set_total_duration(mapsRoute, hereRoute->GetTravelTime());
+
 
                        /* travel mode */
                        maps_route_transport_mode_e eTransportMode;
index 63bdc93..0c9aa0d 100644 (file)
@@ -459,16 +459,11 @@ here_error_e HereView::DrawMap(Evas* pCanvas, int x, int y, int nWidth, int nHei
 
        try {
                for (int i = 0; i < h; i++)
-               {
                        memcpy(dstimg_data+(i*w), srcimg_data+(i*m_pImpl->w+x), w*4);
-               }
-               free(srcimg_data);
        }
-       catch (std::exception &e)
-       {
+       catch (std::exception &e) {
                MAPS_LOGD("Exception caught: %s", e.what());
        }
-
        g_free(srcimg_data);
 
        return HERE_ERROR_NONE;
@@ -507,6 +502,11 @@ here_error_e HereView::ScreenToGeolocation(int x, int y, maps_coordinates_h *map
        double lat = hereCoord.GetLatitude();
        double lng = hereCoord.GetLongitude();
 
+#if 1
+       int error = maps_coordinates_create(lat, lng, mapsCoord);
+       if (error != MAPS_ERROR_NONE)
+               return (here_error_e)ConvertToHereError(error);
+#else
        maps_coordinates_h __mapsCoord;
        int error = maps_coordinates_create(lat, lng, &__mapsCoord);
        if (error != MAPS_ERROR_NONE)
@@ -523,6 +523,7 @@ here_error_e HereView::ScreenToGeolocation(int x, int y, maps_coordinates_h *map
                maps_coordinates_clone(__mapsCoord, mapsCoord);
        }
        maps_coordinates_destroy(__mapsCoord);
+#endif
 
        return HERE_ERROR_NONE;
 }
@@ -628,7 +629,6 @@ void HereView::__processViewObject(const maps_view_object_h object, maps_view_ob
        {
        case MAPS_VIEW_OBJECT_ADD:                      m_pImpl->visualObjects.add(object); break;
        case MAPS_VIEW_OBJECT_SET_VISIBLE:      m_pImpl->visualObjects.setVisible(object); break;
-       case MAPS_VIEW_OBJECT_MOVE:                     m_pImpl->visualObjects.move(object); break;
        case MAPS_VIEW_OBJECT_CHANGE:                   m_pImpl->visualObjects.update(object); break;
        case MAPS_VIEW_OBJECT_REMOVE:                   m_pImpl->visualObjects.remove(object); break;
        default:                        break;