Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[ios] Map view can now be optionally configured to make pitch adjustments w… #12518

Closed
wants to merge 289 commits into from
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
289 commits
Select commit Hold shift + click to select a range
54a7609
Map view can now be optionally configured to make pitch adjustments w…
d-prukop Jul 31, 2018
9b26024
updated to address comments
d-prukop Jul 31, 2018
0b1e7c2
Moved cameraAltitudeAffectedByPitch to private API. Changelog updated
d-prukop Aug 1, 2018
08d8abd
Update MGLMapView.h
d-prukop Aug 2, 2018
3c8acb2
[android] temporarily disable CustomGeometrySource tests
LukasPaczos Aug 13, 2018
b2f60a4
[core] Eliminate setProperty & co.
jfirebaugh Jul 30, 2018
58202ea
[core] Optimize generated set{Paint,Layout}Property code
jfirebaugh Aug 10, 2018
d886d3e
[core] Factor out setVisibility conversion
jfirebaugh Aug 10, 2018
41d5768
[core] Don't default-show text/icons that depend on the placement of …
ChrisLoer Aug 13, 2018
f3ebdae
[windows] Fix build on Windows
tmpsantos Aug 14, 2018
60cbedc
Fix to textureview transparent background testapp activity (#12605)
Aug 14, 2018
16e6ca8
[core] add test for comparing filter name to id
kkaefer Aug 14, 2018
9ecb099
[core] Fix out of range exception for string compare
vkondrashov-t Aug 13, 2018
20f880e
[core] Fix querying for annotations near tile boundaries at high zoom.
ChrisLoer Aug 14, 2018
4b9ed38
[ios] Remove duplicated guides
captainbarbosa Aug 2, 2018
bee605e
Edit link
captainbarbosa Aug 14, 2018
b8a1b13
Fix typo
captainbarbosa Aug 14, 2018
9bd23a7
Update darwin docs
captainbarbosa Aug 14, 2018
04705f4
Addiional darwin fixes and Jazzy template updates
captainbarbosa Aug 14, 2018
66a09b9
Fix line break
captainbarbosa Aug 14, 2018
4116940
Rename link title
captainbarbosa Aug 14, 2018
c96d9df
Guides -> Appendices
captainbarbosa Aug 14, 2018
a3b6fc1
[build] vendor std::expected polyfill
kkaefer Aug 10, 2018
fa7b709
[core] harden OfflineDatabase
kkaefer Jun 13, 2018
89515de
[test] add test for pending offline download when the disk is full
kkaefer Aug 6, 2018
6e06e55
WIP: use expected<T, E> for passing on errors
kkaefer Aug 13, 2018
084c28f
[core] recreate offline database when it is deleted out from under ou…
kkaefer Aug 14, 2018
9d72bf8
[build] make sure we're also updating the mapbox-ios-events submodule
kkaefer Aug 14, 2018
b1ab362
[android] - store release so files with debugging information
tobrun Aug 14, 2018
c2113fd
[android] bumped Snapshot version building on master to 6.5.0
LukasPaczos Aug 15, 2018
1771875
[android] hide peer constructors
LukasPaczos Aug 15, 2018
7795c76
[macos] Rename Guides to Appendices
captainbarbosa Aug 15, 2018
2424582
[macos] Canonicalized another exception name
1ec5 Aug 15, 2018
d3e3490
[ios, macos] Copyedited changelogs
1ec5 Aug 15, 2018
2173088
[ios, macos] Copyedited changelogs
1ec5 Aug 15, 2018
91f934f
[macos] Fix pod name within docs
captainbarbosa Aug 15, 2018
59cdb14
[ios, macos] Update change logs prior to release of v4.3.0 (#12650)
julianrex Aug 15, 2018
1847ef0
[ios, macos] Update podspecs for 4.3.0 and 0.10.0 releases. (#12651)
julianrex Aug 15, 2018
fbc39fa
[android] changelog for v6.4.0
LukasPaczos Aug 15, 2018
369e688
[android] - update changelog with fixed security vulnerability
tobrun Aug 15, 2018
19325b0
[build] More diagnostics for npm install failures
jfirebaugh Aug 16, 2018
790b9f5
[ios] Add experimental frame rate measurements to MGLMapView
friedbunny Jul 16, 2018
8ca419f
[core] Evict unused font stacks from GlyphManager
jfirebaugh Jul 17, 2018
9df9f5f
[build] simplify Android build
kkaefer Aug 17, 2018
112bbc7
[core] make style/conversion.hpp implementation private
kkaefer Aug 17, 2018
ff077e9
[android] obtain paths to file directories on a worker thread
LukasPaczos Aug 16, 2018
036a750
[build] also generate debugging symbols for Release builds in Xcode
kkaefer Aug 20, 2018
1b4398f
[core] downgrade event severity for erroneous DDS rendering to Warning
kkaefer Aug 20, 2018
bded6c6
[build] use plain text files for file lists to simplify integration w…
kkaefer Aug 20, 2018
b0fcca5
[core, node] Re-implement "avoid edges" behavior for MapMode::Tile
ChrisLoer Jul 30, 2018
31bdb74
[build] fixed typo in list of configuration types; RelWithDebugInfo s…
bhaber-t Feb 26, 2018
cf0313f
[core] fix static library build
kkaefer Aug 20, 2018
fae0999
[core] offline region definition - add support for arbitrary geometries
ivovandongen Mar 23, 2018
4fedcf8
[android] arbitrary offline region geometries
ivovandongen Mar 26, 2018
ca0f2f9
[darwin] arbitrary offline region geometries
ivovandongen Mar 26, 2018
fcb6804
[offline] Add option to pass geojson input file
ivovandongen Apr 11, 2018
5005965
Warn if MGLShapeSource is initialized with MGLShapeCollection
captainbarbosa Aug 14, 2018
7fc872b
Add enabled property to MGLShape (#12352)
jmkiley Aug 20, 2018
5297f56
[android] Make AndroidRendererFrontend to request render once per eve…
themics Aug 16, 2018
2c093e7
[android] - converting GeoJsonSource Java features to core ones on a …
LukasPaczos Aug 7, 2018
7e6331b
[android] - updated GeoJsonSource tests
LukasPaczos Aug 13, 2018
5ce64b7
[ios, macos] Introduce `MGLShapeSourceOptionLineDistanceMetrics`
pozdnyakov Aug 10, 2018
7ce6af3
[android] - expose stylejsoon confiugration on MapboxMapOptions and M…
tobrun Aug 17, 2018
2ff1ac3
[android] Move conversion code to .cpp files
jfirebaugh Aug 17, 2018
1584d8f
[android] Remove unused
jfirebaugh Aug 18, 2018
9587f56
[android] Simplify enum conversion
jfirebaugh Aug 18, 2018
a842c19
[android] Inline geometry conversion
jfirebaugh Aug 20, 2018
0218c01
[android] - update map intializer for OfflineRegionDefintion with Off…
tobrun Aug 21, 2018
724832c
[android] - example to render symbols offline with resources loaded f…
tobrun Aug 20, 2018
c5ab61d
added zh_CN strings.xml file
langsmith Aug 21, 2018
516131d
added zh_CN: zh-Hans to android lang_map in tx config file
langsmith Aug 21, 2018
427a7ba
fixed spacing
langsmith Aug 21, 2018
250eaff
abbreviation update
langsmith Aug 21, 2018
33cd094
[core] fix icon-size for small data-driven values
ChrisLoer Aug 21, 2018
fd1767e
[core, test] Bump GL JS pin to bring gl-native back in sync with gl-js.
ChrisLoer Aug 21, 2018
49cf31d
[core] add exception for unimplemented expressions in tests
Aug 21, 2018
67f6891
[android] - GeoJsonOptions javadoc correction on minZoom level and de…
tobrun Aug 22, 2018
87f73bb
[android] "collator" and "resolved-locale" expressions support
LukasPaczos Aug 20, 2018
1662be7
[android] - update user agent telemetry
tobrun Aug 22, 2018
520df7f
[android] - replace hardcode telemetry settings string by resources s…
tobrun Aug 22, 2018
7395a25
[build] Run lower-value iOS CircleCI builds as nightlies
friedbunny Aug 21, 2018
c83012f
fixed validation message for bounds
jjanczyszyn Aug 20, 2018
be83bb7
[android] - update changelog for release v6.5.0-alpha.1
tobrun Aug 22, 2018
d31df6a
[ios, build] Fix bad changelog header and improve handling
friedbunny Aug 21, 2018
5e213d0
[ios, build] Improve jazzy readme generation
friedbunny Aug 21, 2018
4b93e93
[ios] Bump podspecs; update changelogs for 4.4.0-alpha.1
captainbarbosa Aug 22, 2018
cb1f781
[ios] Update changelog for v4.4.0-alpha.1 release
captainbarbosa Aug 22, 2018
52275f8
[build] add plain text file lists for iOS/macOS
kkaefer Aug 22, 2018
fb5afd3
[core] Add `line-gradient` property
pozdnyakov Aug 8, 2018
fc26f2a
[android] - add line-gradient example, integrate lineProgress expression
tobrun Aug 13, 2018
51f3842
[ios] Install node modules in document.sh
captainbarbosa Aug 22, 2018
f9fd9c0
[android] synchronize and coalesce requests targeting the same TileID…
LukasPaczos Jul 30, 2018
0f58d95
[android] invalidate InfoWindow's y-offset when content is set
LukasPaczos Aug 22, 2018
d297bf1
[android] - modularise the sdk
tobrun Jul 17, 2018
fd1ed8c
[android] - update broken test app examples
tobrun Aug 22, 2018
1e45464
[build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL…
kkaefer Nov 20, 2017
3027292
[node] capture invalid input data as `ParseError` objects
kkaefer Jul 16, 2018
1127e35
[android] keep OfflineGeometryRegionDefinition fields and constructor
LukasPaczos Aug 24, 2018
48381ef
SQL Statements to merge an attached database with name 'side' into th…
Aug 21, 2018
065f5ca
[core] Add DefaultFileSource::mergeRegions API and CLI support in the…
Aug 21, 2018
fcab3a8
Add unit tests and fixtures for OfflineDatabase::mergeDatabase
Aug 21, 2018
bc806d4
Use QSqlError::databaseText for reporting errors from SQLite wrapper …
Aug 21, 2018
eb72fe5
Require minimum side-loaded database user_version=6
Aug 21, 2018
d4f4136
Enforce Offline tile limit when merging sideloaded databases
Aug 22, 2018
361d83a
[core] Added pragma to remove warning ("unknown warning group '-Wtaut…
julianrex Aug 28, 2018
4061e90
[build] Add Slack notifications for important iOS builds
friedbunny Aug 24, 2018
8c58842
[android] - update changelog for v6.5.0-alpha.2 release
tobrun Aug 29, 2018
b8dfd2f
[ios] Bump podspecs & update changelog for 4.4.0-alpha.2 (#12770)
captainbarbosa Aug 29, 2018
330ec0b
[build] Fix ios-release-tag slack notification
friedbunny Aug 29, 2018
65ae976
[ios, macos] Fixed typo in style authors guide
1ec5 Aug 29, 2018
5c8ad4d
[android] adding more language maps to tx config file
langsmith Aug 22, 2018
0dac3bc
[android] Explicitly delete local JNI references
jfirebaugh Aug 29, 2018
abc5043
[core] simplify attribute/location types
kkaefer May 31, 2018
f97ba60
[core] rename gl::Attribute to gl::Attribute to remove overloaded naming
kkaefer May 31, 2018
748e6bd
[core] allow passing multiple AttributeTypes to a PaintPropertyBinder
kkaefer May 31, 2018
5e9bbfd
[core] introduce TypeListConcat and TypeList::ExpandInto
kkaefer Jun 1, 2018
ec62e32
[core] move PaintProperty::Attribute to TypeList and pass to Binder c…
kkaefer Jun 4, 2018
4a5dc37
[core] Implement CrossFadedDataDrivenProperty to add support for feat…
Jun 14, 2018
2cdbe93
[windows, qt] fix windows compiler errors, remove tao + tuple polyfill
Aug 22, 2018
4cf6138
[test] ignore legacy expression tests
Aug 27, 2018
7b3edb6
[core] remove redundant Uniform::Type alias
Aug 27, 2018
f7dcd5d
[core] Simplify GeometryTileWorker
jfirebaugh Aug 28, 2018
d197fc7
[core] simplify dependency layout process and refactor data structures
Aug 30, 2018
95b89e6
[ios, node, macos, android] update changelogs for feature expression…
Aug 31, 2018
59ebe02
[android] - bump gradle tools for AS 3.1.4
tobrun Sep 3, 2018
af0de6e
[android] - add Keep annotations to abstract components
tobrun Sep 3, 2018
e7642f2
[android] - make improve this map translatable
tobrun Aug 31, 2018
1099bb4
[android] - add quotes to toString representation of a String literal
tobrun Aug 29, 2018
69b7c2f
[android] bump leak.canary to 1.6.1
LukasPaczos Aug 29, 2018
18b43f2
[android] check if the map is destroyed before saving state in a frag…
LukasPaczos Sep 4, 2018
42aaf3e
[android] - add get source id to supported layer types
tobrun Sep 3, 2018
3f02197
[build] Skip Android device tests via commit message
friedbunny Sep 4, 2018
e4bcd1a
[android] - provide correct expression integration for newly created …
tobrun Aug 29, 2018
7227b4a
[android] MapStrictMode implementation
LukasPaczos Aug 29, 2018
260f96c
[android] Retain a shared thread pool reference
jfirebaugh Sep 4, 2018
fe3fe2d
[ios, macos] Copyedited changelog
1ec5 Sep 1, 2018
c9803e3
[ios] Added Arabic settings, accessibility translations
1ec5 Sep 1, 2018
7017ac5
[ios, macos] Allow -convertCoordinateBounds to span antimeridian
captainbarbosa Aug 28, 2018
c62fabf
[build] add vendored copy of SQLite
Aug 30, 2018
0e95e8f
[build] add ability to extract zip files
kkaefer Aug 30, 2018
679d66f
[build] use vendored SQLite for LTO benefits + custom compile flags
kkaefer Aug 30, 2018
f006eb9
[build] vendor the parts of ICU we need
Sep 4, 2018
e51eb0f
[build] use vendored version of ICU
kkaefer Sep 4, 2018
e082af1
[android] - correct latlngbounds exception message
tobrun Sep 5, 2018
e5bc05e
[android] - allow kotlin sanity activity test generation
tobrun Sep 4, 2018
5aca8e9
[android] - make kotlin activity compatible with sanity tests
tobrun Sep 5, 2018
315a9e3
[ios, macos] Call snapshotter (Obj-C) completion block on dealloc/can…
julianrex Sep 5, 2018
5fb096a
[android] - update changelog for v6.5.0-beta.1
tobrun Sep 5, 2018
15c9ed4
[iOS] Update Events SDK to include key pinning and crash fixes (#12825)
rclee Sep 5, 2018
0a26333
[ios] Update Podspecs & changelog for v4.4.0-beta.1
captainbarbosa Sep 5, 2018
cb141e8
[android] - disable flaky camera tests
tobrun Sep 5, 2018
21ed57a
[android] - update isEmulator check
tobrun Sep 6, 2018
5d8abb6
[core] Mark allow-overlap symbols visible even outside of collision g…
ChrisLoer Aug 21, 2018
50f9381
[core] Fix cubic-bezier interpolation for zooms outside stop range.
ChrisLoer Sep 5, 2018
3ca2050
[ios] Simplify 4.4.0 changelog text
friedbunny Sep 6, 2018
794ba54
[android] minor reference app fixes
LukasPaczos Aug 24, 2018
1c103fa
[android] "is-supported-script" expression support
LukasPaczos Sep 7, 2018
6806ba5
[android] Put function inverses next to each other
jfirebaugh Aug 21, 2018
53c3c32
[android] Upgrade to latest jni.hpp
jfirebaugh Aug 17, 2018
115e862
[android] Simplify Feature conversion
jfirebaugh Aug 22, 2018
3948bbd
[android] Simplify Point conversion
jfirebaugh Aug 22, 2018
6be8302
[android] Simplify JSON conversion
jfirebaugh Aug 22, 2018
5911e3b
[android] Simplify annotation conversion
jfirebaugh Aug 22, 2018
79bf0e8
[android] jni.hpp 4.0.0
jfirebaugh Aug 22, 2018
31cca05
Port symbol-z-order symbol layout style-spec property to Native
Aug 31, 2018
435241c
[macos] macOS 10.10, Xcode 8 no longer supported
1ec5 Sep 6, 2018
e947fa0
Remove Links to Deprecated Frameworks (#12852)
riastrad Sep 10, 2018
06ff49d
[ios, macos, docs] Move MGLShapeOfflineRegion to offline section
captainbarbosa Sep 10, 2018
536652c
[build] Disable implicit fallthrough warnings for sqlite3 (#12855)
anderco Sep 11, 2018
30e570a
[core] add polyfill for codecvt for STLs that don't have it yet
kkaefer Jun 21, 2018
4a3c4ed
[android] add support for gnustl
kkaefer Jun 21, 2018
bc9b224
[build] add android-gnustl-arm-v7 CI job
Jul 25, 2018
2fccdec
[build] add script to generate a standalone version of Mapbox GL
kkaefer Aug 23, 2018
6e171a6
[android] - replace platform default implementation using nunicode fo…
tobrun Jul 27, 2018
511fca7
[ios] Add fall-through single tap to iosapp
friedbunny Feb 7, 2018
e70fe05
[android] - update changelog for v6.5.0
tobrun Sep 11, 2018
5d000d0
[android] merge LocationLayerPlugin to Maps SDK
LukasPaczos Aug 28, 2018
cb771f6
[android] initialize LocationLayerPlugin with Map
LukasPaczos Sep 3, 2018
465316b
[android] adapt LocationLayerPlugin's test suite
LukasPaczos Sep 3, 2018
bfe0b67
[android] LocationLayer example activities
LukasPaczos Sep 4, 2018
fa3f6f0
[android] deactivating default location engine when the map is destroyed
LukasPaczos Sep 5, 2018
cf7752c
[android] save location state
LukasPaczos Sep 5, 2018
907612e
[android] updated naming scheme and packages structure for LocationLa…
LukasPaczos Sep 5, 2018
8cd86fe
[android] improved gestures management while tracking location
LukasPaczos Sep 5, 2018
d4a2123
[android] location saved state tests, default location engine deactiv…
LukasPaczos Sep 6, 2018
caebcd0
[android] LocationComponent - javadoc fixes, improved initialization,…
LukasPaczos Sep 6, 2018
d625993
[android] prevent from reloading the location layer drawables on ever…
LukasPaczos Sep 6, 2018
b2d4b82
[android] updated location tracking gestures management tests
LukasPaczos Sep 6, 2018
229e35e
[android] use the SparseArray instead of the HashMap in location anim…
LukasPaczos Sep 10, 2018
079ba02
[android] improved render timeouts in LocationComponent tests
LukasPaczos Sep 12, 2018
d735d89
[core] Port "collision group" plumbing to gl-native.
ChrisLoer Sep 6, 2018
5238c77
[android] - add binding integration for cross source collision
tobrun Sep 11, 2018
46853dc
[docs] Experiment: stage changelog entry.
ChrisLoer Sep 12, 2018
3263387
[ios, macos] Update Podspecs & changelog for 4.4.0
captainbarbosa Sep 12, 2018
e4e43bb
[node] Release cadence for npm package
jfirebaugh Sep 12, 2018
05a7b78
[core] Add face culling mode parameter to Program::draw
brunoabinader Aug 22, 2018
5b1925d
[core] Enable face culling for fill extrusion layers
brunoabinader Sep 10, 2018
6367fcb
[node] Ignore custom layer tests in node platform
anderco Sep 11, 2018
071129b
[linux,qt] Remove remainder of WebP support
kkaefer Sep 11, 2018
28b14f0
[build] Don't let the binary size query get confused by post-dated co…
jfirebaugh Sep 12, 2018
cc75530
[ios, macos] Fixed changelogs
1ec5 Sep 13, 2018
862b4ff
[ios, macos] Copyedited changelogs
1ec5 Sep 13, 2018
c470bd2
[node] v4.0.0
jfirebaugh Sep 13, 2018
c63e628
[ios, macos] Look even more widely for IB designables agent
1ec5 Sep 13, 2018
9efdc4c
[iOS] Update events library (#12889)
rclee Sep 13, 2018
df93047
[core] ["to-array", <item type>, <empty array>] should work for any i…
jfirebaugh Sep 11, 2018
c044dd8
[core] to-color should be idempotent
jfirebaugh Sep 11, 2018
2c48b5a
[core] Implement array assertion fallback behavior
jfirebaugh Sep 11, 2018
b64b4cd
[tests] Update mapbox-gl-js
jfirebaugh Sep 11, 2018
20adb48
[core] Make "to-number" of null behave as documented
jfirebaugh Sep 13, 2018
29f940d
[android, ios, macos, node] Update CHANGELOGs
jfirebaugh Sep 13, 2018
235f789
[ios] Update changelog and podspecs for ios-v4.4.1
friedbunny Sep 13, 2018
b9ef805
[build] Run cmake again when source file lists changes
anderco Sep 14, 2018
1c53dc9
[core] Refactor vertex array object extension initialization
anderco Aug 28, 2018
68d463e
[core] Disable debugging extension when running on ANGLE over Direct3D
anderco Aug 28, 2018
f3efa62
[build] Reduce CircleCI timeouts for iOS/macOS builds
friedbunny Sep 15, 2018
12809db
[ios, build] Bump timeout for ios-release to 5m
friedbunny Sep 17, 2018
153e97c
[ios, build] Remove broken link from deploy Slack notification
friedbunny Sep 17, 2018
a938c3e
[ios, macos] Offline regions merge. (#12791)
fabian-guerra Sep 17, 2018
80bdbeb
[core] prevent crash when expression for pattern evaluates to "" (#12…
mollymerp Sep 19, 2018
cd031be
[android] - bump snapshot version to v6.6.0
tobrun Sep 19, 2018
47eaea2
[android] - update proguard config to not warn about AutoValue
tobrun Sep 19, 2018
60b8469
[core] add --cache option to GLFW binary to specify the cache database
kkaefer Sep 19, 2018
5af8c53
[android] changelog for 6.6.0.alpha.1
LukasPaczos Sep 19, 2018
a991eec
[ios] Remove Settings target; move Settings.bundle to iosapp
captainbarbosa Sep 6, 2018
89b075f
[core] Auto-convert concat arguments to strings
jfirebaugh Sep 13, 2018
2e93a9d
[core] For string-valued properties, do coercion rather than assertion
jfirebaugh Sep 13, 2018
ab8b6b7
[test] Bump gl-js pin.
ChrisLoer Sep 19, 2018
9b09ec1
[ios, macos] Fix add file content test, create Documents folder when …
fabian-guerra Sep 19, 2018
f7a69d1
[docs] Include uncompressed shader source in .cpp comments
ChrisLoer Sep 19, 2018
bee9a54
[docs] First uncompressed shader source diff
ChrisLoer Sep 19, 2018
41427ff
[ios] Update changelogs and bump podspec to 4.5.0-alpha.1
fabian-guerra Sep 19, 2018
2f7a147
[android] update 6.6.0-alpha.1 changelog to reflect ProGuard changes
LukasPaczos Sep 20, 2018
fc28f39
Map view can now be optionally configured to make pitch adjustments w…
d-prukop Jul 31, 2018
15c76d0
updated to address comments
d-prukop Jul 31, 2018
071b14a
Moved cameraAltitudeAffectedByPitch to private API. Changelog updated
d-prukop Aug 1, 2018
c1b1e29
Update MGLMapView.h
d-prukop Aug 2, 2018
38d01ad
removed setCamera: edgePadding: method
d-prukop Sep 20, 2018
9d984d2
Merge branch 'new-camera-animations' of github.com:mapbox/mapbox-gl-n…
d-prukop Sep 20, 2018
b9992f5
Map view can now be optionally configured to make pitch adjustments w…
d-prukop Jul 31, 2018
55cd73d
updated to address comments
d-prukop Jul 31, 2018
82077ce
Moved cameraAltitudeAffectedByPitch to private API. Changelog updated
d-prukop Aug 1, 2018
ce2d2aa
Update MGLMapView.h
d-prukop Aug 2, 2018
4ea4a94
Map view can now be optionally configured to make pitch adjustments w…
d-prukop Jul 31, 2018
adab22a
updated to address comments
d-prukop Jul 31, 2018
39b4f62
Moved cameraAltitudeAffectedByPitch to private API. Changelog updated
d-prukop Aug 1, 2018
666ec34
removed setCamera: edgePadding: method
d-prukop Sep 20, 2018
959126f
Revert "Moved cameraAltitudeAffectedByPitch to private API. Changelog…
d-prukop Sep 20, 2018
a1c898f
Merge branch 'new-camera-animations' of github.com:mapbox/mapbox-gl-n…
d-prukop Sep 20, 2018
13000b3
removed setCamera: edgePadding: method
d-prukop Sep 20, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fixed a crash when switching between two styles having layers with the same identifier but different layer types. ([#12432](https://github.com/mapbox/mapbox-gl-native/issues/12432))
* Fixed an issue where the symbols for `MGLMapPointForCoordinate` could not be found. ([#12445](https://github.com/mapbox/mapbox-gl-native/issues/12445))
* Fixed an issue causing country and ocean labels to disappear after calling `-[MGLStyle localizeLabelsIntoLocale:]` when the system language is set to Simplified Chinese. ([#12164](https://github.com/mapbox/mapbox-gl-native/issues/12164))
* Added a new method `-[MGLMapView setCamera:edgePadding:]` that sets the camera with arbitrary insets. ([#12518](https://github.com/mapbox/mapbox-gl-native/pull/12518))

## 4.2.0 - July 18, 2018

Expand Down
9 changes: 9 additions & 0 deletions platform/ios/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,15 @@ MGL_EXPORT IB_DESIGNABLE
*/
- (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated;

/**
Moves the viewpoint to a different location without using a transition.

@param camera The new viewpoint.
@param edgePadding The minimum padding (in screen points) that would be visible

*/
- (void)setCamera:(MGLMapCamera *)camera edgePadding:(UIEdgeInsets)edgePadding;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: In this case it may not be necessary to set a specific use case since this falls into the setCamera methods.

 Moves the viewpoint to a different location without using a transition.
 
 @param camera The new viewpoint.
 @param edgePadding The minimum padding (in screen points) that would be visible.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method should accept an animated parameter. Just as there’s a -setVisibleCoordinateBounds:animated: and -setVisibleCoordinateBounds:edgePadding:animated:, there should be -setCamera:animated: and -setCamera:edgePadding:animated:. It seems unfair to force the developer to choose between specifying an edge padding and using the built-in animation capabilities, even if your particular use case doesn’t require those capabilities.


/**
Moves the viewpoint to a different location with respect to the map with an
optional transition duration and timing function.
Expand Down
22 changes: 18 additions & 4 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ @interface MGLMapView () <UIGestureRecognizerDelegate,
@property (nonatomic) MGLUserLocation *userLocation;
@property (nonatomic) NSMutableDictionary<NSString *, NSMutableArray<MGLAnnotationView *> *> *annotationViewReuseQueueByIdentifier;

/// A Boolean value that determines whether the updating pitch will also affect the altitude.
@property(nonatomic, getter=isCameraAltitudeAffectedByPitch) BOOL cameraAltitudeAffectedByPitch;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A more natural name for the getter would be cameraAltitudeIsAffectedByPitch or, given #12518 (comment), cameraAltitudeIsViewingDistance.


@end

@implementation MGLMapView
Expand Down Expand Up @@ -536,6 +539,8 @@ - (void)commonInit
[self addGestureRecognizer:_twoFingerTap];

_hapticFeedbackEnabled = YES;

_cameraAltitudeAffectedByPitch = YES;

_decelerationRate = MGLMapViewDecelerationRateNormal;

Expand Down Expand Up @@ -2352,7 +2357,8 @@ - (void)resetPosition
auto camera = _mbglMap->getStyle().getDefaultCamera();
CGFloat pitch = *camera.pitch;
CLLocationDirection heading = mbgl::util::wrap(*camera.angle, 0., 360.);
CLLocationDistance distance = MGLAltitudeForZoomLevel(*camera.zoom, pitch, 0, self.frame.size);
CLLocationDegrees pitchForAltitude = self.isCameraAltitudeAffectedByPitch ? pitch : 0.0;
CLLocationDistance distance = MGLAltitudeForZoomLevel(*camera.zoom, pitchForAltitude, 0, self.frame.size);
self.camera = [MGLMapCamera cameraLookingAtCenterCoordinate:MGLLocationCoordinate2DFromLatLng(*camera.center)
fromDistance:distance
pitch:pitch
Expand Down Expand Up @@ -3257,6 +3263,11 @@ - (void)setCamera:(MGLMapCamera *)camera
[self setCamera:camera animated:NO];
}

- (void)setCamera:(MGLMapCamera *)camera edgePadding:(UIEdgeInsets)edgePadding
{
[self setCamera:camera withDuration:0 animationTimingFunction:nil edgePadding:edgePadding completionHandler:nil];
}

- (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated
{
[self setCamera:camera withDuration:animated ? MGLAnimationDuration : 0 animationTimingFunction:nil];
Expand Down Expand Up @@ -3428,7 +3439,8 @@ - (MGLMapCamera *)cameraForCameraOptions:(const mbgl::CameraOptions &)cameraOpti
double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel;
CLLocationDirection direction = cameraOptions.angle ? mbgl::util::wrap(-MGLDegreesFromRadians(*cameraOptions.angle), 0., 360.) : self.direction;
CGFloat pitch = cameraOptions.pitch ? MGLDegreesFromRadians(*cameraOptions.pitch) : _mbglMap->getPitch();
CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitch, centerCoordinate.latitude, self.frame.size);
CLLocationDegrees pitchForAltitude = self.isCameraAltitudeAffectedByPitch ? pitch : 0.0;
CLLocationDistance altitude = MGLAltitudeForZoomLevel(zoomLevel, pitchForAltitude, centerCoordinate.latitude, self.frame.size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pitch is by definition affected by zoom level: when the map is tilted and the zoom level changes (whether programmatically or via a gesture), the viewing distance from the focal point and the viewpoint’s distance from the ground (the altitude) both change.

These changes affect the camera getters only. So the new property is a strange way of telling the getter to effectively lie about the camera relative to what mbgl thinks the camera is. Is there no way to derive the correct value from the existing return value, perhaps by exposing MGLAltitudeForZoomLevel publicly, as proposed in #5583?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think mbgl comes in to this at all. As far as I can tell this is all happening in MGLGeometry in the iOS SDK. The pure values in mbgl are what I want.

Copy link
Contributor Author

@d-prukop d-prukop Aug 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The pure values in mbgl are what I want.

This is wrong.
The problem with exposing MGLAltitudeForZoomLevel is that, if you use setCamera, mbgl sets it's state from the result of MGLZoomLevelForAltitude. The stored zoomLevel is affected by pitch. I want to prevent the mbgl state from getting that value. I want it to store the zoomLevel without regards to pitch.

Copy link
Contributor

@1ec5 1ec5 Aug 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to change the zoom level without changing the pitch, set a camera whose pitch is -1. This behavior is documented in MGLMapCamera but it could stand to be documented more discoverably. (If this SDK were written in Swift without regard for Obective-C compatibility, the various properties of MGLMapView would all be optional.)

Copy link
Contributor

@1ec5 1ec5 Aug 3, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@d-prukop and I chatted about this today. The pitch is considered twice when calculating the camera options, once for setting the camera’s actual pitch and once in calculating the zoom level. I would’ve thought that this is ideal, because the zoom level on a tilted map is really the viewing distance, but I suppose if the intention is to iteratively change the viewing distance by getting and setting the camera iteratively, then there could be a sort of feedback effect.

The essence of my concern here is that we’re adding a separate code path for a specific use case. If we really believe that the altitude-to-zoom-level conversion shouldn’t be affected by the pitch, then why not remove the pitch argument from MGLZoomLevelForAltitude() and MGLAltitudeForZoomLevel() and always assume a pitch of 0°? The obvious consequence would be that the MGLMapCamera returned by the camera getter would have the same altitude regardless of the pitch.

In other words, isCameraAltitudeAffectedByPitch changes the meaning of altitude from “shortest distance between the viewpoint and the ground” to “viewing distance from the focal point”, essentially a linear, physical-unit version of zoomLevel (and not what the word “altitude” means in real life). Maybe that’s what the use case above calls for: a property for explicitly setting the viewing distance of a camera instead of the altitude. We already have a zoomLevel property in MGLMapSnapshotOptions, so why not add an alternative to altitude to MGLMapCamera? One reason why is that it’s awkward for an object to sport mutually exclusive properties. Any future attempt at making the isCameraAltitudeAffectedByPitch option public or defaulting it to YES will need to consider whether we instead need a viewingDistance property on MGLMapCamera.

return [MGLMapCamera cameraLookingAtCenterCoordinate:centerCoordinate fromDistance:altitude pitch:pitch heading:direction];
}

Expand All @@ -3442,7 +3454,8 @@ - (MGLMapCamera *)cameraForCameraOptions:(const mbgl::CameraOptions &)cameraOpti
options.center = MGLLatLngFromLocationCoordinate2D(camera.centerCoordinate);
}
options.padding = MGLEdgeInsetsFromNSEdgeInsets(insets);
options.zoom = MGLZoomLevelForAltitude(camera.altitude, camera.pitch,
CLLocationDegrees pitch = (self.isCameraAltitudeAffectedByPitch) ? camera.pitch : 0.0;
options.zoom = MGLZoomLevelForAltitude(camera.altitude, pitch,
camera.centerCoordinate.latitude,
self.frame.size);
if (camera.heading >= 0)
Expand Down Expand Up @@ -5144,10 +5157,11 @@ - (void)didUpdateLocationSignificantlyAnimated:(BOOL)animated
MGLMapCamera *camera = self.camera;
camera.centerCoordinate = self.userLocation.location.coordinate;
camera.heading = self.directionByFollowingWithCourse;
CLLocationDegrees pitch = (self.isCameraAltitudeAffectedByPitch) ? camera.pitch : 0.0;
if (self.zoomLevel < MGLMinimumZoomLevelForUserTracking)
{
camera.altitude = MGLAltitudeForZoomLevel(MGLDefaultZoomLevelForUserTracking,
camera.pitch,
pitch,
camera.centerCoordinate.latitude,
self.frame.size);
}
Expand Down
4 changes: 4 additions & 0 deletions platform/macos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Token string syntax (`"{token}"`) in `MGLSymbolStyleLayer` `text` and `iconImageName` properties is now correctly converted to the appropriate `NSExpression` equivalent. ([#11659](https://github.com/mapbox/mapbox-gl-native/issues/11659))
* Fixed a crash when switching between two styles having layers with the same identifier but different layer types. ([#12432](https://github.com/mapbox/mapbox-gl-native/issues/12432))

## Other changes

* Added a new method `-[MGLMapView setCamera:edgePadding:]` that sets the camera with arbitrary insets. ([#12518](https://github.com/mapbox/mapbox-gl-native/pull/12518))

# 0.9.0 - July 18, 2018

## Styles and rendering
Expand Down
9 changes: 9 additions & 0 deletions platform/macos/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ MGL_EXPORT IB_DESIGNABLE
*/
- (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated;

/**
Moves the viewpoint to a different location without using a transition.

@param camera The new viewpoint.
@param edgePadding The minimum padding (in screen points) that would be visible

*/
- (void)setCamera:(MGLMapCamera *)camera edgePadding:(NSEdgeInsets)edgePadding;

/**
Moves the viewpoint to a different location with respect to the map with an
optional transition duration and timing function.
Expand Down
5 changes: 5 additions & 0 deletions platform/macos/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,11 @@ - (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated {
[self setCamera:camera withDuration:animated ? MGLAnimationDuration : 0 animationTimingFunction:nil completionHandler:NULL];
}

- (void)setCamera:(MGLMapCamera *)camera edgePadding:(NSEdgeInsets)edgePadding
{
[self setCamera:camera withDuration:0 animationTimingFunction:nil edgePadding:edgePadding completionHandler:nil];
}

- (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function completionHandler:(nullable void (^)(void))completion {
[self setCamera:camera withDuration:duration animationTimingFunction:function edgePadding:self.contentInsets completionHandler:completion];
}
Expand Down