Commit Graph

9987 Commits

Author SHA1 Message Date
John Firebaugh
4e752f63b9 [core] Redo approach to unsupported VAO extension 2017-02-20 08:24:42 -08:00
Konstantin Käfer
f8ab327874 [macos,ios] add tests for MGLOfflineStorageDelegate 2017-02-20 14:36:27 +01:00
Konstantin Käfer
f0ec9fb74b [test] add unit test for DefaultFileSource::setResourceTransform() 2017-02-20 14:36:27 +01:00
Konstantin Käfer
9ad29af400 [android] OfflineManager#setResourceTransform to allow transforming URLs prior to internet requests 2017-02-20 14:36:27 +01:00
Konstantin Käfer
c86e38e303 [android] use shared DefaultFileSource for all maps + OfflineManager 2017-02-20 14:36:27 +01:00
Konstantin Käfer
6c0310209d [macos,ios] expose callback for transforming URLs 2017-02-20 14:36:27 +01:00
Konstantin Käfer
03a14ff000 [darwin] move RunLoop initialization to static variable 2017-02-20 14:36:27 +01:00
Konstantin Käfer
e2d8a83664 [core] add ability to transform URLs before they're requested from the Internet 2017-02-20 14:36:27 +01:00
Minh Nguyễn
8669f933fd [ios, macos] Convert NSColor/UIColor expressions to CSS color string values
When converting a constant NSExpression to an mbgl::Value, turn an NSColor or UIColor into an std::string containing a CSS color string. This allows developers to set an attribute of an MGLFeature to an NSColor or UIColor (rather than a CSS color string, which would be foreign), then use it in an MGLStyleFunction with identity interpolation.
2017-02-18 14:42:16 -08:00
Jason Wray
65b42949c7 [ios] Fix locale-based language switching demo
Copy-pasted the better implementation from macOS.
2017-02-17 18:47:32 -05:00
Jesse Bounds
9924535415 [core] Render a circle if either the color or stroke color are visible
This updates the circle paint check to pass if the circle stroke is
visible but:

* The circle color is clear
* The circle is transparent
* The circle has a radius of 0

Previously, a transparent circle or a circle with a radius of 0 would
cause the layer to be passed up even if the circle stroke color had a
non zero alpha.
2017-02-17 14:36:36 -08:00
Ivo van Dongen
ab20d38883 [android] fix default value conversion on dds functions 2017-02-17 13:17:20 -08:00
Anand Thakker
062b18374d [core] Enable property functions for text-{field,transform} (#7944) 2017-02-17 13:16:25 -08:00
Jesse Crocker
d4c569a018 [ios] Disable region monitoring when stopping location monitoring (#7833) 2017-02-16 12:36:21 -08:00
Jesse Bounds
655b7c035c [ios] Search for ICU path using cmake cache 2017-02-16 10:59:54 -08:00
Minh Nguyễn
06eebd3793 [ios, macos] Reorganized changelogs 2017-02-15 22:51:30 -08:00
Minh Nguyễn
b06ae5e6b7 [macos] Make ± key bindings respect tab order, zoomEnabled 2017-02-15 22:51:30 -08:00
Eimantas Vaiciunas
d8bdc7307d [macos] Make + and - keys zoom the map
Override `insertText:`

- send all `keyDown:` events to `interpretKeyEvents:` method;
- in `insertText:` method check for the text to be sent and
  adjust zoom level if needed;
2017-02-15 22:51:30 -08:00
Anand Thakker
685f237d02 Refactor: use conversion system to convert MGLStyleFunction to mbgl core types (#8026)
This leverages the work already happening in `mbgl::style::conversion` to convert style functions from style-spec definitions into `mbgl::style::{Camera,Source,Composite}Function`s.  In particular, this allows the conversions system to handle the differing typing requirements based on whether the output type of the style function is interpolatable or non-interpolatable.
2017-02-15 17:16:54 -05:00
John Firebaugh
eb8a1ef7aa [tests] Disable timing-based Timer tests in CI 2017-02-15 15:09:30 -06:00
Tobrun
0c0d7ceaeb [android] - use project wide configurations for all modules + fixup wear compile error (#8066) 2017-02-15 19:56:31 +01:00
John Firebaugh
8f1c580ea1 [core] Fix aliased text on mobile GPUs
Need highp precision for gamma values on mobile devices. lowp triggers aliasing artifacts at larger font sizes.

Note that this change is a hand-edit to the generated shader sources, rather than pulling https://github.com/mapbox/mapbox-gl-js/pull/4275 and running the generator script. The reason for that is that the upstream shader now assumes support for DDS properties that gl-native does not yet support. Once that support lands in gl-native, we can regenerate the shader source.
2017-02-15 11:22:41 -06:00
John Firebaugh
f030da5ccd [core] Add noexcept(false) in MBGL_CHECK_ERROR
C++11 destructors are noexcept by default, so the prior definition always called std::terminate without allowing anything to catch the exception.
2017-02-15 11:22:23 -06:00
Tobrun
8bf1cf7843 Do not draw foregroundBearingDrawable when rotation sensor is not available (#8065) 2017-02-15 16:02:34 +01:00
Tobrun
9ed9a32ded [android] - remove unused telem constants (#8061) 2017-02-15 16:02:17 +01:00
Tobrun
3cde400b9f [android] - ignore device dependant tests (#8063) 2017-02-15 16:01:58 +01:00
Tobrun
65ed1e6019 [android] - when removing out of viewport MarkerViews keep reference to MapboxMap to be able to update the underlying Marker. (#8064) 2017-02-15 16:01:42 +01:00
Tobrun
d07a6aa1ad [android] - prefix key constants used for Activity saved instance bundle with mapbox_ (#8060) 2017-02-15 16:01:27 +01:00
Tobrun
24432e0b98 [android] - null checking when invalidating as the invalidate callback can be invoked while the reference to MapView isn't valid anymore. (#8062) 2017-02-15 12:57:44 +01:00
John Firebaugh
0351e9c370 [core] Eliminate SpritePatternMode 2017-02-14 16:28:12 -06:00
John Firebaugh
b18a4d6e78 [core] Mutex no longer needs to be recursive 2017-02-14 16:28:12 -06:00
John Firebaugh
d819ece74c [core] Combine SpriteAtlas::getPosition with SpriteAtlas::getImage 2017-02-14 16:28:12 -06:00
John Firebaugh
58de1e15c5 [core] Inline SpriteAtlas::allocateImage 2017-02-14 16:28:12 -06:00
John Firebaugh
5524506abd [core] Eliminate SpriteAtlas::updateDirty
Simplify internal datastructures. Properly remove rects from the bin pack when an image is removed.
2017-02-14 16:28:12 -06:00
John Firebaugh
3fa6a4f4ff [core] Eliminate SpriteAtlas::Holder 2017-02-14 16:28:12 -06:00
Antonio Zugaldia
44fa4d6aad [android] Release Android v5.0.0-beta.1 (#8052)
* [android] [auto] Update properties to version 5.0.0-beta.1 in preparation for build.

* [android] remove unnecessary files

* update CHANGELOG.md

* revert version number to 5.0.0-SNAPSHOT

* fixed small typo
2017-02-14 17:03:45 -05:00
Thiago Marcos P. Santos
b822c9466b [glfw] Include gl.hpp first to avoid redefinition of GLAPIENTRY
Mesa does not check if GLAPIENTRY was defined before before defining
it, what makes the compiler sad. So we make Mesa define it first,
before GLFW.
2017-02-14 21:55:44 +02:00
John Firebaugh
94f011895c [core] Make Image safer
Provide Image::copy, which handles copying rectangles from a source to a destination, with thorough bounds checking.

Also fixes an indexing error in SpriteAtlas, where the top row of pixels in a wrapped image was copied from the wrong source row.
2017-02-14 12:29:01 -06:00
John Firebaugh
c6d5eaf479 [tests] Use test::checkImage 2017-02-14 12:29:01 -06:00
Konstantin Käfer
43e81509fb [macos] reuse OpenGL context when switching screens 2017-02-14 14:15:36 +01:00
Jason Wray
d12ac71ba7 [macos] Round non-freeform zoom gestures/commands to nearest integer
Affects:
 - Double-tap gestures
 - Two-finger tap gestures
 - +/- button pushes
 - Shortcut keys
 - Menu items and shortcut keys (in macapp)
2017-02-13 18:35:04 -05:00
Jason Wray
235a06795a [ios] Add iosapp Show Zoom Level debug option 2017-02-13 18:35:04 -05:00
Jason Wray
3ec93d3bbe [ios] Round tap-zoom gestures to nearest integer
Round double-tap and two-finger tap zoom gestures to the nearest integer zoom level. This has the benefits for raster tiles, as well as styles with zoom-based functions.

This results in a wider possible zoom range — ~0.5-1.5:

Old: z4.6 → z5.6 (+1.0), z4.4 → z5.4 (+1.0)
New: z4.6 → z6.0 (+1.4), z4.4 → z5.0 (+0.6)
2017-02-13 18:35:04 -05:00
Jason Wray
4c311a0091 [core] Expose Map::setZoom with anchor parameter 2017-02-13 18:35:04 -05:00
John Firebaugh
3b53259c93 [build] Use backtrace-for-all-exit-codes branch of logbt 2017-02-13 17:26:07 -06:00
Thiago Marcos P. Santos
e8065cfc10 [glfw] Fix viewport not being resized
Reproducible on Linux. On OSX, map looks slightly scaled.
2017-02-13 19:10:21 +02:00
Konstantin Käfer
f97e36acc8 [core] add tests for user/password, port, trailing dot, and IPv4/IPv6 address parsing 2017-02-13 17:23:20 +01:00
John Firebaugh
090fb92fbf [build] Add --track-origins=yes to valgrind arguments 2017-02-13 10:11:26 -06:00
Benedikt Huss
b9be66f287 [ios] Do not deselect annotations any longer when map is zoomed/panned or annotation is moved out of the visible bounds 2017-02-11 13:34:33 -08:00
Minh Nguyễn
e6c15d0f6f Upright CJK characters in vertically-oriented labels (#7114)
CJK characters and adjacent punctuation now remain upright in vertically oriented labels that have line placement.

Fixes #1682.
2017-02-10 18:57:48 -06:00