Commit Graph

87 Commits

Author SHA1 Message Date
Thiago Marcos P. Santos
82b801250e [tests] Add unit tests for query features fiters 2016-10-05 11:12:16 +03:00
Konstantin Käfer
3f3fc7b772 [test] add .test.cpp suffix to test case files 2016-09-28 16:34:22 +02:00
John Firebaugh
e126dc3a5a [core] Fix updates of line and fill annotations 2016-08-29 08:08:44 -07:00
John Firebaugh
6bbb2e4c2b [tests] Merge single test in set_style.cpp with other Map tests 2016-08-23 09:55:32 -07:00
Konstantin Käfer
e6bcbdd5d3 [core] set correct depth values for CustomLayer so compositing works 2016-08-22 18:32:12 +02:00
Thiago Marcos P. Santos
cb3b2997ea [tests] Include what we use 2016-08-22 16:52:02 +03:00
Jesse Bounds
dfd40b27a5 [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.
2016-08-19 16:51:01 +03:00
Jesse Bounds
d4271d993e [core] Compare unsigned int to unsigned int to pass tidy check (#5986) 2016-08-12 17:08:52 -07:00
Minh Nguyễn
e147887e35 [core, android, ios, macos] Replaced getPointAnnotationsInBounds() w/ queryPointAnnotations() (#5165)
queryPointAnnotations() accepts a screen rectangle instead of a geographic bounding box, so marker hit testing works at the edges of a rotated, tilted map view.

Fixes #5151.
2016-08-12 15:45:18 -07:00
Konstantin Käfer
e46b580c67 [build] unify naming of Makefile targets
`make foo` just builds
`make run-foo` builds and runs
2016-08-05 11:42:22 +02:00
Minh Nguyễn
53131def65 [core] Fixed test build errors
Missed this bad merge from #5729.
2016-07-19 15:26:09 -07:00
Minh Nguyễn
1cf6b5de0c Merge branch 'release-ios-v3.3.0' 2016-07-19 15:22:17 -07:00
Minh Nguyễn
8179f2f6b2 [core] Restored shape annotation z-order
Shapes are once again always added to the top z-index.

Fixes #5691.

Cherry-picked from 74fe96d261.
2016-07-18 15:21:35 -07:00
Minh Nguyễn
74fe96d261 [core] Restored shape annotation z-order
Shapes are once again always added to the top z-index.

Fixes #5691.
2016-07-18 14:43:44 -07:00
Bruno de Oliveira Abinader
c670b08ecb [core] Use PropertyValue<T> for Annotation line/fill 2016-07-13 11:57:09 +03:00
Bruno de Oliveira Abinader
33a8856c2a [test] Added max zoom annotation tests 2016-06-28 12:02:43 +03:00
John Firebaugh
2921127bdb [core] Avoid unnecessary work when a symbol annotation is updated
In particular, if only the geometry changes, don't cascade and recalculate the style.
2016-06-17 11:38:04 -07:00
Young Hahn
24b66bc8cd Color class (#5361)
* Color class

* Switch to list initialization
2016-06-15 11:38:22 -04:00
Bruno de Oliveira Abinader
6e22de8cce [tidy] Check modernize-use-auto
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-auto.html
2016-06-13 23:32:06 +03:00
Bruno de Oliveira Abinader
92f605df32 [tidy] Check modernize-use-nullptr
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-use-nullptr.html
2016-06-13 23:32:05 +03:00
Konstantin Käfer
2bdecdf9f9 [core] fix pedantic warning messages 2016-06-13 11:16:19 +02:00
John Firebaugh
e802aedb8c [core, node, android] Remove used "base" parameter from setStyleJSON 2016-06-02 16:33:56 -07:00
John Firebaugh
c902f9098b [core] Rationalize naming for style-related code 2016-06-02 14:51:39 -07:00
John Firebaugh
d7e1ecd19e [core] Generalize Map::{add,remove}CustomLayer 2016-06-02 14:51:39 -07:00
John Firebaugh
1fb96d38a0 [tests] Tweak LineAnnotation test so that it reveals a bug; fix the bug 2016-06-02 14:47:35 -07:00
John Firebaugh
2c8d225cf2 [tests] Clean up annotation tests 2016-06-02 14:45:30 -07:00
John Firebaugh
0fba70d5a8 [all] Rationalize annotation API 2016-06-01 17:37:01 -07:00
John Firebaugh
8985b1311b [core] Use geometry.hpp types for shape annotations 2016-06-01 17:36:50 -07:00
Minh Nguyễn
8ace0d37d1 [core] AnnotationTileLayer vends its own name (#5163)
Fixes #5159.
2016-05-26 13:12:23 -07:00
Konstantin Käfer
ec70125e41 [core] move TileData and dependents to new *TileID classes 2016-05-10 14:50:56 +02:00
Bruno de Oliveira Abinader
4e04a107e8 Revert "[core] Do not clear custom layers upon style switch"
This reverts commit 8ec875b87c.
2016-04-21 20:15:18 +03:00
Bruno de Oliveira Abinader
8ec875b87c [core] Do not clear custom layers upon style switch 2016-04-21 15:09:54 +03:00
Thiago Marcos P. Santos
a0146e372f [tests] Accept [C|c]onnect as error message
Qt will spit "Connect" instead of "connect"
2016-04-20 20:55:51 +03:00
John Firebaugh
b55692132a [tests] Use StubFileSource where a real FileSource is not required 2016-04-14 14:18:19 -07:00
John Firebaugh
204c7fee03 [core] Render from the main thread
Do not create a thread for the MapContext anymore.
2016-04-14 13:44:08 -07:00
John Firebaugh
1c7c5af69d [ios] Run core unit tests in CI 2016-04-11 11:00:34 -07:00
John Firebaugh
f964e40e7e [build] Refactor and simplify build system
* Main gyp files are now standardized as platform/<platform>/platform.gyp.
* Each platform gyp file defines appropriate loop_lib and headless_lib variables.
* Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms.
* CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`.
* Renamed the "linux" test app to "glfw". It's now built in OS X CI.
* Android build flakiness is fixed.
* iOS CI builds the bench and iosapp targets.
* Mesa version is now in one place.
* CI scripts use bash "strict mode" and correct error handling.
* All build output goes to the build directory.
* Removed vestigial iOS/OS X/Android Travis scripts.
2016-04-07 18:01:02 -07:00
Konstantin Käfer
c587eefbb1 [ios] make unit tests work on iOS and iOS Simulator 2016-03-22 11:56:01 -07:00
Konstantin Käfer
db5ac4785f [test] rearrange test files so they're not in the fixtures folder 2016-03-22 11:56:01 -07:00
Thiago Marcos P. Santos
b8b283588f [core] Remove goOffline() from DefaultFileSource
Use the newly added NetworkStatus::Set().
2016-03-08 10:31:01 -03:00
John Firebaugh
d5eb5240f8 Revert "[gl] Updated CustomLayer tests"
These tests are intended to reflect how someone using the custom layer feature might actually write their callbacks. Therefore the callbacks should not use mbgl-specific classes.

This reverts commit 69112a2a09.
2016-02-18 15:15:24 -08:00
Bruno de Oliveira Abinader
69112a2a09 [gl] Updated CustomLayer tests 2016-02-18 13:27:35 +02:00
John Firebaugh
ce1d8561b4 [tests] Add test for Map::updatePointAnnotation 2016-02-12 16:47:24 -08:00
John Firebaugh
cdedb66387 [core] Reimplement existing caching within an offline-capable database schema 2016-02-10 15:40:20 -08:00
John Firebaugh
dbb8e58aea [core] Moving caching logic to DefaultFileSource
This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
2016-02-10 15:40:20 -08:00
Ansis Brammanis
d34f8eb674 [core][ios][osx][android] make SpriteImage accept PremultipliedImage
the SpriteImage constructor signature changes from

SpriteImage(
        uint16_t width, uint16_t height, float pixelRatio,
        std::string&& data, bool sdf = false);

to

SpriteImage(PremultipliedImage&&, float pixelRatio, bool sdf = false)
2016-01-19 18:23:21 -08:00
Konstantin Käfer
5fe586633c [test] ensure static rendering finishes when a tile can't be loaded 2016-01-15 12:48:23 +01:00
John Firebaugh
5a7d2fd60e [core] Eliminate platform::assetRoot()
I regenerated assets.zip so that all file paths have an `assets/` prefix, as the Android AssetFileSource implementation asserts, and removed `TEST_DATA` from the paths.
2016-01-13 13:40:31 -08:00
John Firebaugh
86c8446d3a [core] Simplify asset:// implementation
* Move asset:// URL handling to DefaultFileSource.
* AssetFileSource implements FileSource interface and follows familiar implementation patterns.
* Move default implementation to platform/default, zip implementation to platform/android.
* Don't bother with modified / expires / etag -- assets are not cached so it doesn't matter.
* Don't bother with interleaving individual IO calls on the implementation thread. That adds a lot of complexity for very little benefit.
2016-01-13 13:40:31 -08:00
Konstantin Käfer
7e815aed2e [test] allow aborting rendering after a timeout 2016-01-08 13:23:01 +01:00