Commit Graph

406 Commits

Author SHA1 Message Date
Jesse Bounds
b7b6706576 [ios] Use map view frame to calculate annotation view reuse adjustments (#8926)
* [ios] Use map view frame to calculate annotation view reuse adjustments

The value for determining the visible viewport buffer and also the distance to move offscreen an annotation view outside of that buffer was based on the annotation view width and height. This changes that to use the map viewport width and height as constants and avoids a class of bugs where the annotation view would become detached from the tracking system when it did not have a size or was animating from a small to large size.
2017-05-09 12:08:41 -07:00
Jason Wray
d99ebea930 [ios] Check for NaN when calculating scale bar width 2017-05-08 15:44:51 -04:00
Justin R. Miller
e5ae80ca96 [ios] properly show attribution in modal hierarchies (#8837)
fixes #8782
2017-05-02 14:07:57 -07:00
Lauren Budorick
f6e79d7073 [core] Render fill-extrusion layers (#8431) 2017-04-27 15:56:55 -07:00
John Firebaugh
5dd98df50b [all] Rationalize style::Image
A style has a collection of images, just as it has collections of sources and layers.

* Name things appropriately
* Use std::unique_ptr
2017-04-24 15:52:28 -07:00
Minh Nguyễn
6f708ac545 [ios, macos] Update MGLMapView logo view (#8771)
* [ios, macos] Updated logo view to new Mapbox logo

* [default] Updated attribution logo SVG
2017-04-24 13:31:22 -04:00
Justin R. Miller
43cc8dbdb8 [ios] fixes #8522: don't alter tint color on annotation views (#8789) 2017-04-21 11:50:34 -07:00
John Firebaugh
092da9c956 [core] Remove non-Map-dependent projection methods from Map 2017-04-18 14:43:31 +03:00
Fredrik Karlsson
8eb23cbac8 [ios] Scale bar (#7631)
* [ios] added a scale bar

* [ios] update design

* [ios] show/hide scale bar

* [ios] Remove the need to localize 0

* [ios] Support for imperial units

* [ios] Round to nearest foot

* [ios] Make scale bar private

* [ios] Update design and clean up

* [ios] Rename and various optimizations

* [ios] RTL support

* [ios] added max scale and removed animations

* [ios] animate scale bar
2017-04-16 17:24:17 +02:00
Bruno de Oliveira Abinader
2f4d162deb [core] Tighten geo.hpp ctors 2017-04-14 12:33:13 -07:00
John Firebaugh
f1c06f8d83 [all] Remove redundant scale-related camera methods
We don't need to have two different measurement systems for map zoom.
2017-04-13 10:28:44 -07:00
Jordan Kiley
258ac8219a [ios] added check for annotation view animation (#8565)
Addressed #8489
2017-04-12 11:30:28 -07:00
Fabian Guerra
12b6fdbe3b Merge branch 'release-ios-v3.5.0-android-v5.0.0' into boundsj-merge-release-branch
# Conflicts:
#	cmake/core-files.cmake
#	mapbox-gl-js
#	platform/android/CHANGELOG.md
#	platform/ios/CHANGELOG.md
#	platform/macos/CHANGELOG.md
#	platform/qt/bitrise-qt5.yml
#	src/mbgl/gl/attribute.hpp
#	src/mbgl/gl/context.cpp
#	src/mbgl/gl/program.hpp
#	src/mbgl/map/map.cpp
#	src/mbgl/programs/program.hpp
#	src/mbgl/renderer/painter.cpp
2017-04-11 21:46:23 -04:00
David Chiles
10c6f1fe4f [ios] Match gesture recognizer with map view user interaction state 2017-04-11 07:33:22 -07:00
Bruno de Oliveira Abinader
a9e09c710e [ios, macos] MGLMapView size check for OpenGL 2.0 ES minimum texture size 2017-04-10 18:01:28 +03:00
Jesse Bounds
03d10bb67a [ios, macos] Guard against looking up annotation contexts MGLAnnotationTagNotFound (#8686) 2017-04-07 15:23:39 -07:00
Minh Nguyễn
8382420314 [ios, macos] Fail gracefully on invalid coordinates
Invalid coordinates no longer cause an exception to be raised immediately when used in conversion methods and model objects. Instead, the appropriate invalid values are used, consistent with MapKit. Exceptions are still raised when invalid model objects are used with the map.
2017-04-06 09:22:51 -07:00
Minh Nguyễn
d39ea23b09 [ios, macos] Hardened std::map usage in MGLMapVIew
Replaced std::map::operator[] usage with std::map::at(). Backed up an assertion on iOS with a guard when -annotationTagsInRect: returns the tag of a nonexistent annotation, for consistency with macOS. Removed an unnecessary and risky subscript into _annotationContextsByAnnotationTag in -positioningRectForCalloutForAnnotationWithTag: on iOS.
2017-04-05 14:56:06 -07:00
Fabian Guerra Soto
ec34813c90 [ios] assertion to check if an annotationTag > 0 (#8588)
* [ios] assertion to check if an annotationTag > 0

* [ios,macos] assertion and guard added to check annotations in  visibleAnnotationsInRect
2017-04-05 14:16:58 -04:00
Jesse Bounds
ff73371216 [ios] Silence incompatible type warning for callout view (#8608)
This silences a compatibility warning that was introduced in a previous
refactor that changed the return type of the callout view for
annotation delegate method. This also adds checks to ensure that the
callout view provided by the delegate to the map view is of the correct
type and conforms to the correct protocol.
2017-04-04 15:25:59 -07:00
Jason Wray
228bff7602 [ios] Replaced UIActionSheet, UIAlertView with UIAlertController 2017-04-01 19:58:09 -07:00
Minh Nguyễn
003caddbc0 [ios] Localized map view proxy accessibility hint 2017-03-30 11:47:09 -07:00
Jesse Bounds
dcb14f98ee [ios] Modify return type so callout bridges with protocol in Swift
`- (nullable UIView <MGLCalloutView> *)mapView:(MGLMapView *)mapView
calloutViewForAnnotation:(id <MGLAnnotation>)annotation;` bridges
with a `UIView?` return type in Swift. This changes replaces the
`UIView` type in the method signature so that, when bridged to Swift,
the returned object is defined as `MGLCalloutView?`.
2017-03-29 16:58:07 -07:00
Fabian Guerra Soto
c5c69102c5 [ios] nil check in visibleAnnotationsInRect to avoid crash (#8513) 2017-03-28 16:06:16 -04:00
Konstantin Käfer
a84aa453a9 [core] Privatize OpenGL/Context headers 2017-03-28 13:53:19 +02:00
Konstantin Käfer
234384ece9 [core] Move OpenGL extension initialization to Backend 2017-03-23 14:50:11 -07:00
Konstantin Käfer
8e5214144e [core] Ensure that a BackendScope exists when doing GL calls 2017-03-23 14:50:11 -07:00
John Firebaugh
e488ca702e Merge branch 'release-ios-v3.5.0-android-v5.0.0' 2017-03-21 12:04:20 -07:00
Jason Wray
751fa3b8a2 [ios, build] Change version checker URL to ios-sdk site (#8468)
Decouple the version checker updating from the deploy process.
2017-03-19 01:29:25 -04:00
Minh Nguyễn
f846205eb6 [ios, macos] Fix map load error descriptions (#8466)
* [ios, macos] Corrected map load error descriptions

Ensured the uniqueness of localizable string IDs. Ran make genstrings to add the -[MGLMapViewDelegate mapViewDidFailToLoad:withError:] error description strings to the base localization.

* [ios, macos] Moved failure error changelog entry to new release
2017-03-18 14:59:11 -07:00
Bruno de Oliveira Abinader
6379cb0cd7 [ios] Update changes in MapObserver::onDidFailLoadingMap 2017-03-17 11:25:48 +02:00
Bruno de Oliveira Abinader
25f48a913d [ios] Support mbgl::MapObserver 2017-03-15 14:53:32 +02:00
Minh Nguyễn
4430e65603 [ios, macos] Expanded feature querying documentation
Also fixed a couple incorrect Swift method names on macOS.
2017-03-14 14:42:57 -07:00
Jason Wray
48e17724a1 [ios] Enable one-finger quickzoom gesture on iPad 2017-03-13 16:49:46 -04:00
Minh Nguyễn
b74d7bfdb4 [ios, macos] Corrected polyline equality
Now that annotation classes override -isEqual:, it’s no longer appropriate to rely on -isEqual: or -containsObject: to check for the preexistence of an annotation. Those methods become deep equality tests, which have worse performance. Checking for identity allows the developer to add a polyline and polygon with identical coordinates, title, etc. to the map.

Implemented a missing -[MGLPolyline isEqual:].

Removed outdated comments about -annotationTagForAnnotation: being expensive.
2017-03-10 15:08:00 -08:00
Fabian Guerra Soto
ffce46cae6 Raise exception when MGLAnnotationView.annotation property is nil (#8339)
* [ios] MGLAnnotationView annotation property made writable

* [ios] standarized exception name for annotations
2017-03-10 14:49:22 -08:00
John Firebaugh
65f74224ab Merge master into release-ios-v3.5.0-android-v5.0.0 2017-03-08 17:31:03 -08:00
Jordan Kiley
ece19acd10 [ios, macos] Added a timing note for two delegate methods (#8259) 2017-03-07 17:39:42 -08:00
Jason Wray
5e36743ef7 [ios] Add SDK version update checking/notification 2017-03-07 10:43:08 -08:00
Ivo van Dongen
161ae804c2 [ios, macos] Add support for queryRenderedFeatures filter 2017-03-04 15:42:07 -08:00
Asheem Mamoowala
60d10dd27d [core] Add support for queryRenderedFeatures filter 2017-03-04 15:42:07 -08:00
Minh Nguyễn
7e9701283f [ios, macos] Update callout when relocating annotation
When relocating a selected point annotation, update the associated callout (popover) rather than deselecting the annotation.
2017-03-03 22:09:41 -08:00
Nadia Barbosa
9ea4113634 [ios] Clarify docs for MGLUserTrackingMode 2017-03-03 18:59:30 -08:00
Nadia Barbosa
4d058ffd94 [ios, macos] Exclude MGLUserTrackingMode from macOS 2017-03-03 18:59:30 -08:00
Fabian Guerra Soto
1f1cc131ea [ios] Fixed conversion between Duration and NSTimeInerval (#8276) 2017-03-03 20:11:06 -05:00
Fabian Guerra Soto
8a5cc3560a [ios] MGLAnnotationView annotation property made writable (#8139) 2017-03-02 18:19:23 -05:00
Minh Nguyễn
2f388d6635 Merge branch 'release-ios-v3.4.0' into 1ec5-release-ios-v3.4.2 2017-02-21 22:47:15 -08:00
Minh Nguyễn
b512af6a66 [ios, macos] Smarten apostrophes after backticks
jazzy is inconsistently converting straight apostrophes that immediately follow backticks into either &lsquo; or &rsquo; from one run to the next. Smarten the apostrophe to keep it stable.
2017-02-21 22:14:29 -08:00
Jason Wray
c7975e6a18 [ios] Clean-up conditionals for iOS <8 2017-02-21 16:10:00 -05:00
Konstantin Käfer
3ef9e26593 [ios,macos,android,qt] use shared threadpool 2017-02-20 19:26:06 +01:00