summaryrefslogtreecommitdiff
path: root/metrics/tests
diff options
context:
space:
mode:
authorGali Nelle <galinelle.mapbox@gmail.com>2020-03-25 17:35:44 +0200
committergalinelle <paolo.angelelli@mapbox.com>2020-04-08 14:00:26 +0300
commit9a55c282fecfdd76b1acdf64cef0ce2ed99472ef (patch)
treed2c412ef6ac4782d28cea66b761deeb5fff10cc3 /metrics/tests
parent7f53cec17b047a1804952a8da543dc10321e1dae (diff)
downloadqtlocation-mapboxgl-9a55c282fecfdd76b1acdf64cef0ce2ed99472ef.tar.gz
Add LocationIndicatorLayer
New key is "G" in mbgl-glfw, cycling between no puck, centered in the viewport and positioned in Tokyo.
Diffstat (limited to 'metrics/tests')
-rw-r--r--metrics/tests/location_indicator/dateline/expected.pngbin0 -> 9307 bytes
-rw-r--r--metrics/tests/location_indicator/dateline/style.json68
-rw-r--r--metrics/tests/location_indicator/default/expected.pngbin0 -> 13669 bytes
-rw-r--r--metrics/tests/location_indicator/default/style.json100
-rw-r--r--metrics/tests/location_indicator/no_radius_border/expected.pngbin0 -> 9301 bytes
-rw-r--r--metrics/tests/location_indicator/no_radius_border/style.json68
-rw-r--r--metrics/tests/location_indicator/no_radius_fill/expected.pngbin0 -> 7625 bytes
-rw-r--r--metrics/tests/location_indicator/no_radius_fill/style.json68
-rw-r--r--metrics/tests/location_indicator/no_textures/expected.pngbin0 -> 2392 bytes
-rw-r--r--metrics/tests/location_indicator/no_textures/style.json65
-rw-r--r--metrics/tests/location_indicator/one_texture/expected.pngbin0 -> 3500 bytes
-rw-r--r--metrics/tests/location_indicator/one_texture/style.json66
-rw-r--r--metrics/tests/location_indicator/rotated/expected.pngbin0 -> 9452 bytes
-rw-r--r--metrics/tests/location_indicator/rotated/style.json68
-rw-r--r--metrics/tests/location_indicator/tilted/expected.pngbin0 -> 5958 bytes
-rw-r--r--metrics/tests/location_indicator/tilted/style.json68
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift/expected.pngbin0 -> 6502 bytes
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift/style.json68
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_bottom_left/expected.pngbin0 -> 6396 bytes
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_bottom_left/style.json69
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_bottom_right/expected.pngbin0 -> 5996 bytes
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_bottom_right/style.json68
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_top_left/expected.pngbin0 -> 3327 bytes
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_top_left/style.json68
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_top_right/expected.pngbin0 -> 3238 bytes
-rw-r--r--metrics/tests/location_indicator/tilted_texture_shift_top_right/style.json68
-rw-r--r--metrics/tests/location_indicator/two_textures/expected.pngbin0 -> 8945 bytes
-rw-r--r--metrics/tests/location_indicator/two_textures/style.json67
28 files changed, 979 insertions, 0 deletions
diff --git a/metrics/tests/location_indicator/dateline/expected.png b/metrics/tests/location_indicator/dateline/expected.png
new file mode 100644
index 0000000000..8e1e2e95e9
--- /dev/null
+++ b/metrics/tests/location_indicator/dateline/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/dateline/style.json b/metrics/tests/location_indicator/dateline/style.json
new file mode 100644
index 0000000000..410fc5c531
--- /dev/null
+++ b/metrics/tests/location_indicator/dateline/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/default/expected.png b/metrics/tests/location_indicator/default/expected.png
new file mode 100644
index 0000000000..5823cce89e
--- /dev/null
+++ b/metrics/tests/location_indicator/default/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/default/style.json b/metrics/tests/location_indicator/default/style.json
new file mode 100644
index 0000000000..b0f58b4055
--- /dev/null
+++ b/metrics/tests/location_indicator/default/style.json
@@ -0,0 +1,100 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "sources": {
+ "geojson": {
+ "type": "geojson",
+ "data": {
+ "type": "FeatureCollection",
+ "features": [
+ {
+ "type": "Feature",
+ "properties": {
+ },
+ "geometry": {
+ "type": "Point",
+ "coordinates": [
+ 139.766707,
+ 35.693055
+
+ ]
+ }
+ }
+ ]
+ }
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "lightseagreen"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "circle",
+ "source": "geojson",
+ "paint": {
+ "circle-radius": 40,
+ "circle-color" : "rgba(255,0,0,0.1)"
+ }
+ },
+ {
+ "id": "puck124",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/no_radius_border/expected.png b/metrics/tests/location_indicator/no_radius_border/expected.png
new file mode 100644
index 0000000000..436a27ed08
--- /dev/null
+++ b/metrics/tests/location_indicator/no_radius_border/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/no_radius_border/style.json b/metrics/tests/location_indicator/no_radius_border/style.json
new file mode 100644
index 0000000000..922cd0c0f0
--- /dev/null
+++ b/metrics/tests/location_indicator/no_radius_border/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "sprite" : {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/no_radius_fill/expected.png b/metrics/tests/location_indicator/no_radius_fill/expected.png
new file mode 100644
index 0000000000..447546c880
--- /dev/null
+++ b/metrics/tests/location_indicator/no_radius_fill/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/no_radius_fill/style.json b/metrics/tests/location_indicator/no_radius_fill/style.json
new file mode 100644
index 0000000000..a01ee0c576
--- /dev/null
+++ b/metrics/tests/location_indicator/no_radius_fill/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/no_textures/expected.png b/metrics/tests/location_indicator/no_textures/expected.png
new file mode 100644
index 0000000000..8ac31bf4df
--- /dev/null
+++ b/metrics/tests/location_indicator/no_textures/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/no_textures/style.json b/metrics/tests/location_indicator/no_textures/style.json
new file mode 100644
index 0000000000..1cae891f77
--- /dev/null
+++ b/metrics/tests/location_indicator/no_textures/style.json
@@ -0,0 +1,65 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/one_texture/expected.png b/metrics/tests/location_indicator/one_texture/expected.png
new file mode 100644
index 0000000000..c0fb9ce580
--- /dev/null
+++ b/metrics/tests/location_indicator/one_texture/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/one_texture/style.json b/metrics/tests/location_indicator/one_texture/style.json
new file mode 100644
index 0000000000..f44b698c05
--- /dev/null
+++ b/metrics/tests/location_indicator/one_texture/style.json
@@ -0,0 +1,66 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/rotated/expected.png b/metrics/tests/location_indicator/rotated/expected.png
new file mode 100644
index 0000000000..4b481b12d5
--- /dev/null
+++ b/metrics/tests/location_indicator/rotated/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/rotated/style.json b/metrics/tests/location_indicator/rotated/style.json
new file mode 100644
index 0000000000..5a75f56e22
--- /dev/null
+++ b/metrics/tests/location_indicator/rotated/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 0,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted/expected.png b/metrics/tests/location_indicator/tilted/expected.png
new file mode 100644
index 0000000000..624be49df3
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted/style.json b/metrics/tests/location_indicator/tilted/style.json
new file mode 100644
index 0000000000..9dfe1033ff
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 60,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 0
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted_texture_shift/expected.png b/metrics/tests/location_indicator/tilted_texture_shift/expected.png
new file mode 100644
index 0000000000..0a4baa1b58
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted_texture_shift/style.json b/metrics/tests/location_indicator/tilted_texture_shift/style.json
new file mode 100644
index 0000000000..6b6372ae1d
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 55,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/expected.png b/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/expected.png
new file mode 100644
index 0000000000..a651914b09
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/style.json b/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/style.json
new file mode 100644
index 0000000000..1d5bb8ae6f
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_bottom_left/style.json
@@ -0,0 +1,69 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.768885, 35.693125 ],
+ "zoom": 16,
+ "pitch" : 60,
+ "bearing" : 42,
+ "sources": {},
+
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/expected.png b/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/expected.png
new file mode 100644
index 0000000000..d0839ea66f
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/style.json b/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/style.json
new file mode 100644
index 0000000000..611bea2a98
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_bottom_right/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766487, 35.694867 ],
+ "zoom": 16,
+ "pitch" : 60,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_top_left/expected.png b/metrics/tests/location_indicator/tilted_texture_shift_top_left/expected.png
new file mode 100644
index 0000000000..48747eb194
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_top_left/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_top_left/style.json b/metrics/tests/location_indicator/tilted_texture_shift_top_left/style.json
new file mode 100644
index 0000000000..00899046d6
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_top_left/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766972, 35.687286 ],
+ "zoom": 16,
+ "pitch" : 60,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_top_right/expected.png b/metrics/tests/location_indicator/tilted_texture_shift_top_right/expected.png
new file mode 100644
index 0000000000..3b39556295
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_top_right/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/tilted_texture_shift_top_right/style.json b/metrics/tests/location_indicator/tilted_texture_shift_top_right/style.json
new file mode 100644
index 0000000000..71412339e6
--- /dev/null
+++ b/metrics/tests/location_indicator/tilted_texture_shift_top_right/style.json
@@ -0,0 +1,68 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.759723, 35.692799 ],
+ "zoom": 16,
+ "pitch" : 60,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 0,
+ "bearing-image" : "puck",
+ "top-image" : "puck_hat",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}
diff --git a/metrics/tests/location_indicator/two_textures/expected.png b/metrics/tests/location_indicator/two_textures/expected.png
new file mode 100644
index 0000000000..f876aaddb7
--- /dev/null
+++ b/metrics/tests/location_indicator/two_textures/expected.png
Binary files differ
diff --git a/metrics/tests/location_indicator/two_textures/style.json b/metrics/tests/location_indicator/two_textures/style.json
new file mode 100644
index 0000000000..01c5405265
--- /dev/null
+++ b/metrics/tests/location_indicator/two_textures/style.json
@@ -0,0 +1,67 @@
+{
+ "version": 8,
+ "metadata": {
+ "test": {
+ "width": 512,
+ "height": 256,
+ "operations": [
+ [
+ "addImage",
+ "puck_hat",
+ "puck_hat.png"
+ ],
+ [
+ "addImage",
+ "puck",
+ "puck.png"
+ ],
+ [
+ "addImage",
+ "puck_shadow",
+ "puck_shadow.png"
+ ]
+ ]
+ }
+ },
+ "center": [ 139.766707, 35.693055 ],
+ "zoom": 16,
+ "pitch" : 0,
+ "bearing" : 42,
+ "sources": {},
+ "layers": [
+ {
+ "id": "background",
+ "type": "background",
+ "paint": {
+ "background-color": "white"
+ }
+ },
+ {
+ "id": "puck123",
+ "type": "location-indicator",
+ "layout" : { "bearing" : 45,
+ "bearing-image" : "puck",
+ "shadow-image" : "puck_shadow",
+ "perspective-compensation" : 1,
+ "image-tilt-displacement" : 5
+ },
+ "paint" : {
+ "accuracy-radius-transition": { "duration": 0, "delay": 0 },
+ "bearing-image-size-transition": { "duration": 0, "delay": 0 },
+ "top-image-size-transition": { "duration": 0, "delay": 0 },
+ "shadow-image-size-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-color-transition": { "duration": 0, "delay": 0 },
+ "accuracy-radius-border-color-transition": { "duration": 0, "delay": 0 },
+
+ "location" : [ 35.693055, 139.766707, 0],
+ "accuracy-radius": 90.0,
+ "bearing-image-size" : 48,
+ "top-image-size" : 16,
+ "shadow-image-size" : 112,
+
+ "accuracy-radius-color": "rgba(255,0,0,0.2)",
+ "accuracy-radius-border-color": "rgba(255,0,255,0.6)"
+ }
+ }
+ ]
+}