From f77f6b720f9c89815d2358055e63ceb266648828 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Fri, 19 Aug 2016 15:33:49 +0300 Subject: [PATCH 1/4] [build] geojsonvt @ v6.1.3 --- .mason | 2 +- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.mason b/.mason index a6a366440ee..95ab9caff80 160000 --- a/.mason +++ b/.mason @@ -1 +1 @@ -Subproject commit a6a366440ee0ad2b28970493b15b294544944dfe +Subproject commit 95ab9caff80d6327a13ed48f97c72ae4da4454bd diff --git a/CMakeLists.txt b/CMakeLists.txt index 3489f6cd4fb..34217e4b57f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,7 +23,7 @@ mason_use(variant VERSION 1.1.0 HEADER_ONLY) mason_use(unique_resource VERSION dev HEADER_ONLY) mason_use(rapidjson VERSION 1.0.2 HEADER_ONLY) mason_use(boost VERSION 1.60.0 HEADER_ONLY) -mason_use(geojsonvt VERSION 6.1.2 HEADER_ONLY) +mason_use(geojsonvt VERSION 6.1.3 HEADER_ONLY) mason_use(supercluster VERSION 0.2.0 HEADER_ONLY) mason_use(kdbush VERSION 0.1.1 HEADER_ONLY) mason_use(earcut VERSION 0.11 HEADER_ONLY) From 7d40d6347ea66fa9e9ba088ac8de0b5014036a5a Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Fri, 19 Aug 2016 15:48:00 +0300 Subject: [PATCH 2/4] [build] Re-enable 'circle-radius/antimeridian' @ test suite --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68775b37b01..67bde9f480c 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "express": "^4.11.1", "mapbox-gl-shaders": "mapbox/mapbox-gl-shaders#de2ab007455aa2587c552694c68583f94c9f2747", "mapbox-gl-style-spec": "mapbox/mapbox-gl-style-spec#83b1a3e5837d785af582efd5ed1a212f2df6a4ae", - "mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#7babab52fb02788ebbc38384139bf350e8e38552", + "mapbox-gl-test-suite": "mapbox/mapbox-gl-test-suite#b8354e386693a4045aa309e1e85507de4d9aadec", "mkdirp": "^0.5.1", "node-cmake": "^1.2.1", "request": "^2.72.0", From d70eda8504fb1062de449a223489874cb90b57d7 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Fri, 19 Aug 2016 16:34:55 +0300 Subject: [PATCH 3/4] [build] Fix macOS compdb path on YCM --- .ycm_extra_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py index 7a02a5e14d7..e3956095488 100644 --- a/.ycm_extra_conf.py +++ b/.ycm_extra_conf.py @@ -38,7 +38,7 @@ compilation_database_folders = [ 'build/linux-x86_64/Debug', - 'build/macos/Debug', + 'build/macos/compdb/Debug', ] subprocess.call(['make compdb'], shell=True) From dfd40b27a54115cdf769abdda3ec4d3a1329758c Mon Sep 17 00:00:00 2001 From: Jesse Bounds Date: Tue, 16 Aug 2016 15:04:12 -0700 Subject: [PATCH 4/4] [tests] Add tests for shape overlays crossing the antimeridian This adds two tests: AntimeridianAnnotationSmall: Test that a shape that is represented with +-180 longitudinal values is drawn spanning the antimeridian. In other words, it is rendered as a "small" shape as opposed to one that spans around the world to reach the other side of the antimeridian. This test is currently failing at the time of this commit. AntimeridianAnnotationLarge: Test that a shape that is represented with points that do not cross the +-180 boundary is rendered as a "large" shape. In other words, it is rendered by wrapping around the world to reach the other side of the meridian. This test is currently passing at the time of this commit. --- test/api/annotations.cpp | 42 ++++++++++++++++++ .../expected.png | Bin 0 -> 1579 bytes .../expected.png | Bin 0 -> 1652 bytes 3 files changed, 42 insertions(+) create mode 100644 test/fixtures/annotations/antimeridian_annotation_large/expected.png create mode 100644 test/fixtures/annotations/antimeridian_annotation_small/expected.png diff --git a/test/api/annotations.cpp b/test/api/annotations.cpp index 9ec44975887..b6f861f9000 100644 --- a/test/api/annotations.cpp +++ b/test/api/annotations.cpp @@ -79,6 +79,48 @@ TEST(Annotations, FillAnnotation) { test.checkRendering("fill_annotation_max_zoom"); } +TEST(Annotations, AntimeridianAnnotationSmall) { + AnnotationTest test; + + double antimeridian = 180; + test.map.setLatLngZoom(mbgl::LatLng(0, antimeridian), 0); + test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json")); + + LineString line = {{ { antimeridian, 20 }, { antimeridian, -20 } }}; + LineAnnotation lineAnnotation { line }; + lineAnnotation.color = { { 255, 0, 0, 1 } }; + lineAnnotation.width = { 2 }; + test.map.addAnnotation(lineAnnotation); + + Polygon polygon = {{ {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} }}; + FillAnnotation polygonAnnotation { polygon }; + polygonAnnotation.color = { { 0, 0, 255, 1 } }; + test.map.addAnnotation(polygonAnnotation); + + test.checkRendering("antimeridian_annotation_small"); +} + +TEST(Annotations, AntimeridianAnnotationLarge) { + AnnotationTest test; + + double antimeridian = 180; + test.map.setLatLngZoom(mbgl::LatLng(0, antimeridian), 0); + test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json")); + + LineString line = {{ { antimeridian, 20 }, { antimeridian, -20 } }}; + LineAnnotation lineAnnotation { line }; + lineAnnotation.color = { { 255, 0, 0, 1 } }; + lineAnnotation.width = { 2 }; + test.map.addAnnotation(lineAnnotation); + + Polygon polygon = {{ {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} }}; + FillAnnotation polygonAnnotation { polygon }; + polygonAnnotation.color = { { 0, 0, 255, 1 } }; + test.map.addAnnotation(polygonAnnotation); + + test.checkRendering("antimeridian_annotation_large"); +} + TEST(Annotations, OverlappingFillAnnotation) { AnnotationTest test; diff --git a/test/fixtures/annotations/antimeridian_annotation_large/expected.png b/test/fixtures/annotations/antimeridian_annotation_large/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..3e8de0b38c422584e55a375c7366355e2aaaf882 GIT binary patch literal 1579 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=FJKJzX3_ zDj471e(2X6z{7Uo?2muzZJyqb@Yr@&B=2_hv>6D>*bUFfy@l2q=s) zhFBmdcs(fGZM&_1#n&~#{tuSNozzluQ1EhKaPf?4cW`863@FI(QWH>BU|6KG)_K8# z1_lia6IJ03ApwTKN!Jtu0vs4bWM)m`bm8P^(C~aMprN6_z{Tf#l4TJKi^G&9r5qw6 z0t~F}%TkyEnV1y3E?Kc~ad9*>IR_gxYA`YisAkGCv9i{2Ut9A;gz0v@Q2ftb_t)Fp z)_N|)u-a!=&HQlobAl231%w#fi?{V3Sm@9uaEq&(TZys2BEy<9MXZBc$(+&nd}J<* zpO^rHI&<_qhcrgU36)k^$_1Mm7%U`jd}1-;=4d!`IZ(QBGAql0lLw}$Pl$A2NSW7n zi(`(?hyOATckYYWuQz??*mnN>%egEZd$@e61Tx%S?Af+2mwS=2=4RqDQkFZ+ z5m|R;scsM#V5sJgW|;;IH1FQ%%`D%Tm=fM6b{_}=(klzIryYoMV0dGjBNzb;cOBEb zvqCqxL5_%T(Pd)UC)iP4=FU*__}$)a?jx}kkqWF1K$kr3b=cqi-uLkInn;G2Lw7!^ z=$+sTE*0KzSmdii0x(i|4q5g%uro4VNbIUoFaSmh+d~<*1mdKI;Vst0G7v4q5uE@ literal 0 HcmV?d00001 diff --git a/test/fixtures/annotations/antimeridian_annotation_small/expected.png b/test/fixtures/annotations/antimeridian_annotation_small/expected.png new file mode 100644 index 0000000000000000000000000000000000000000..cfe564feabf0edce908aa411913523b250abebdc GIT binary patch literal 1652 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K5893O0R7}x|G!U;i$lZxy-8q?;3=C{~o-U3d z6^w6hU(Ay-6k)lrwCl>h|JS$qOHau9su*yzpnT(TcFo96iRAeQCwnyJ7Are6FfcN) za0n=jGKN?nEO1J=zis~Y^?!eT-JN7td`9y_^10M#Q${9HCawie7iCz~L<1Nmv!&l; z(P9yCXkBE<;iI*HL5=s^Ce9EJjRr2)Vu2YU4vaohb5ey@2m~;Qc0E%tSlPfd!^GmW zT7cpL1}%}ZjtN1GtOl6{(|i{=IWUH3%xXTcgo!KR(gU5@4y_GLD*{Z|8$DS?4lFrX z8~g3;AbRi`>N=oP$_=m4KRpCfR&7X6RCQn)Eu!TT100nb${s<5JMQ==|;R1NlQ%2bORpGzc7vZECj9Gc(l=W-#qb+-&h9vC-~M zA5(?L=12T8f360FGptsvE8oxeFLoO1yATHMmOmNY_4a&!j?Z?K<9vGmeJ#UJ$@@1S zJ}t8Sv;WM~XOv%`0+8>^n)y$fHZX#j20e4w%~01&sD>8(ptaG``e8Nz-olS)78&q Iol`;+03ZsM)Bpeg literal 0 HcmV?d00001