Add ability to set marker z-order 29/93329/1
authorMatt Blair <blair1618@gmail.com>
Thu, 20 Oct 2016 23:11:07 +0000 (19:11 -0400)
committerMatt Blair <blair1618@gmail.com>
Thu, 20 Oct 2016 23:11:07 +0000 (19:11 -0400)
Change-Id: I95cd8e221caecf1e972602bb98e29bd8049cd462

lib/arm/libtangram.so
lib/i586/libtangram.so
src/mapzen/tangram/tangram.h
src/mapzen/tangram_view.cpp

index 94a8b111996795a414271feb5e80e5840ab0a7a4..92b0dcf25d6a2013047e1274fd28b77a7947f361 100755 (executable)
Binary files a/lib/arm/libtangram.so and b/lib/arm/libtangram.so differ
index 81ab24d66365b6506afd3e5192749145a27a4ca0..72c9f578b71728dc1b08dcebe7bf5b8f3c323acc 100755 (executable)
Binary files a/lib/i586/libtangram.so and b/lib/i586/libtangram.so differ
index ab0c619200e094ac759963d20ff24a5e1ea13ae0..2841a2f55d9c6bf3961e96c31aadd9253e9e57bf 100644 (file)
@@ -18,7 +18,7 @@ struct TouchItem {
 };
 
 struct SceneUpdate {
-    std::string keys;
+    std::string path;
     std::string value;
 };
 
@@ -30,6 +30,7 @@ enum class EaseType : char {
 };
 
 class Map {
+
 public:
 
     // Create an empty map object. To display a map, call either loadScene() or loadSceneAsync().
@@ -162,6 +163,9 @@ public:
     // updated, otherwise returns false.
     bool markerSetStyling(MarkerID _marker, const char* _styling);
 
+    // Set a bitmap to use as the image for a point marker; _data is a buffer of RGBA pixel data with
+    // length of _width * _height; pixels are in row-major order beginning from the bottom-left of the
+    // image; returns true if the marker ID was found and successfully updated, otherwise returns false.
     bool markerSetBitmap(MarkerID _marker, int _width, int _height, const unsigned int* _data);
 
     // Set the geometry of a marker to a point at the given coordinates; markers can have their
@@ -193,6 +197,10 @@ public:
     // updated, otherwise returns false.
     bool markerSetVisible(MarkerID _marker, bool _visible);
 
+    // Set the ordering of point marker object relative to other markers; higher values are drawn 'above';
+    // returns true if the marker ID was found and successfully updated, otherwise returns false.
+    bool markerSetDrawOrder(MarkerID _marker, int _drawOrder);
+
     // Remove all marker objects from the map; Any marker IDs previously returned from 'markerAdd'
     // are invalidated after this.
     void markerRemoveAll();
@@ -232,6 +240,7 @@ private:
 
     class Impl;
     std::unique_ptr<Impl> impl;
+
 };
 
 enum DebugFlags {
index 51162200ee51572b5934a43afc81165ebfb2056b..fed50358beca29fd3dea6e00bc0a1fb5808336e4 100644 (file)
@@ -681,6 +681,12 @@ mapzen_error_e TangramView::updateMarker(maps_view_object_h object, Tangram::Mar
 
                maps_coordinates_destroy(mapsCoord);
                m_map->markerSetPoint(tvMarker, Tangram::LngLat(lng, lat));
+
+               int drawOrder = 0;
+               error = maps_view_object_marker_get_z_order(object, &drawOrder);
+               if (error != MAPS_ERROR_NONE) { break; }
+               m_map->markerSetDrawOrder(tvMarker, drawOrder);
+
        } while (0);
 
        return (mapzen_error_e)convert_maps_error_to_mapzen_error(error);