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/.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) 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) 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", 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 00000000000..3e8de0b38c4 Binary files /dev/null and b/test/fixtures/annotations/antimeridian_annotation_large/expected.png differ 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 00000000000..cfe564feabf Binary files /dev/null and b/test/fixtures/annotations/antimeridian_annotation_small/expected.png differ