summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorryanhamley <ryan.hamley@mapbox.com>2018-10-04 11:07:28 -0700
committerryanhamley <ryan.hamley@mapbox.com>2018-10-04 11:07:28 -0700
commit147e0d5d6941b5f809a29e1decc045b5d6b9d847 (patch)
treefaad21f998d81cd6749fa6e8bee30f2f633d53fa
parent0200773762e72089efcae0db5682989b6fda9027 (diff)
downloadqtlocation-mapboxgl-upstream/icon-rotate-query.tar.gz
-rw-r--r--platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java4
-rw-r--r--platform/glfw/glfw_view.cpp3
2 files changed, 7 insertions, 0 deletions
diff --git a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
index acdb1d216d..33c6467fad 100644
--- a/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
+++ b/platform/android/MapboxGLAndroidSDKTestApp/src/main/java/com/mapbox/mapboxsdk/testapp/activity/style/SymbolLayerActivity.java
@@ -38,7 +38,9 @@ import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconAnchor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconColor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconIgnorePlacement;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconImage;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconRotate;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconSize;
+import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.iconOffset;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textAllowOverlap;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textAnchor;
import static com.mapbox.mapboxsdk.style.layers.PropertyFactory.textColor;
@@ -118,6 +120,8 @@ public class SymbolLayerActivity extends AppCompatActivity implements MapboxMap.
iconSize(switchCase(toBool(get(SELECTED_FEATURE_PROPERTY)), literal(3.0f), literal(1.0f))),
iconAnchor(Property.ICON_ANCHOR_BOTTOM),
iconColor(Color.RED),
+ iconOffset(new Float[] {30f, 30f}),
+ iconRotate(45f),
textField(get(TITLE_FEATURE_PROPERTY)),
textFont(new String[] {"DIN Offc Pro Regular", "Arial Unicode MS Regular"}),
textColor(Color.RED),
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp
index 9179113139..57238e042a 100644
--- a/platform/glfw/glfw_view.cpp
+++ b/platform/glfw/glfw_view.cpp
@@ -150,6 +150,9 @@ GLFWView::~GLFWView() {
void GLFWView::setMap(mbgl::Map *map_) {
map = map_;
map->addAnnotationImage(makeImage("default_marker", 22, 22, 1));
+ map->addAnnotationImage(makeImage("test", 22, 22, 1));
+ spriteIDs.push_back("test");
+ annotationIDs.push_back(map->addAnnotation(mbgl::SymbolAnnotation { makeRandomPoint(), "test" }));
}
void GLFWView::setRenderFrontend(GLFWRendererFrontend* rendererFrontend_) {