Commit Graph

1105 Commits

Author SHA1 Message Date
Minh Nguyễn
3b546b9646 [ios, macos] Ignore progress updates after suspending
-suspend and -resume are now presumed to be synchronous, even if technically they remain asynchronous under the hood.
2016-09-20 22:34:54 -07:00
Justin R. Miller
13e63dbff5 [ios] add OS_ACTIVITY_MODE=disable for Xcode 8 spew (#6382) 2016-09-19 13:57:22 -07:00
Jason Wray
23eaf6fb86 [ios] Don't specify Swift version for jazzy doc generation (#6377) 2016-09-19 15:43:45 -04:00
Justin R. Miller
0bd66d40dd [ios] fixes #6248: properly handle all NSNumber types in filters (#6290) 2016-09-16 11:46:22 -07:00
Jason Wray
83d0b39adb [ios, macos] Remove changelog lines for WAL db change 2016-09-14 15:46:45 -04:00
Jesse Bounds
922bb3bc37 [ios] Use content inset to calculate edge padding (#6313)
This reverts a previous change that used only the contentInset
when setting the center coordinate of the map view.
Instead of contentInset, edgePaddingForFollowing is used. This fixes
a regression that caused the user dot annotation to be misplaced
when the map was configured to show the annotation in any place other
than in the center of the map.

In addition, edgePaddingForFollowing is updated to account for
contentInset when it calculates its UIEdgeInsets. This fixes a bug
where the user dot would move to the center of the content frame
(when it was adjusted for content insets) but the map would not scroll
along with it yielding the effect of the user dot being misplaced.
2016-09-13 22:24:37 -07:00
Jesse Bounds
4c8d61abf1 [ios, macos] Put MGLStyleLayer inits in respective classes
Previously, we declared MGLStyleLayer initializers in the MGLStyleLayer
protocol as optional methods. This made it easy to opt in and out
of initializers that did or or did not make sense for the subclass.
However, this approach was dangerous since it was easy for an
application developer to initialize an MGLStyleLayer subclass with an
init method that was actually not implemented in that class causing
an exception at runtime.

This commit moves the init methods that each subclass supports to
each subclass so xcode (and the compiler) help the developer avoid
the previously possible runtime exception.

In addition, a new init method is added that takes the source layer
and passes that on to `mbgl::style:Layer` (but only on classes
where this is possible in core). This allows an application developer
to style a specific source layer (i.e. the contour lines of the mapbox
terrain vector source).

Finally, this refactors MGLStyleLayer classes to use an MGLSource instead of a
string identifier for the source when initializing the style.
2016-09-08 09:17:35 -07:00
John Firebaugh
fe2a26225f [core, ios, android, qt] Observe style layer mutations rather than requiring SDKs to use Map::update
This paves the way for updates to filter and layout properties to trigger a source reload, without each SDK having to participate in the implementation.
2016-09-06 14:29:22 -07:00
Jesse Bounds
52f23614b3 [ios] Remove iosapp test stub
The PR to add filter predicates (#6049) added logic to apply some
runtime styling to the iosapp as soon as the map finished loading.
This removes that logic.
2016-09-02 15:37:13 -07:00
Jason Wray
aff278ce52 ios-v3.4.0-alpha.4 2016-09-02 18:23:15 -04:00
Minh Nguyễn
05f129212d [ios] Updated changelog 2016-09-02 15:22:28 -07:00
Jesse Bounds
08f55af914 [ios, macos] Use NSDictionary for geojson source options.
This removes a previous implementation of geojson options that used
a new type to transfer the data around. Added in its place is
an options API that takes an NSDictionary that works similarly to
NSAttributedString and many other Cocoa APIs that take options.

The options parser now expects the developer to send values of the
type noted in the documentation and it simply converts the NSNumber
to the correct type (integer, double, or bool) for mbgl. However, an
exception is raised if the value is not an NSNumber.
2016-09-02 14:48:37 -07:00
Fredrik Karlsson
ad095e458d [ios, macos] fixes #5962 added geojson options to support clustering 2016-09-02 14:41:47 -07:00
Fredrik Karlsson
d77a13eb73 [ios] Added support for filters (NSPredicate)
[ios, macos] cleaned up filters

[ios] added a filter example

[ios] utest filters

[ios, macos] nested predicates

[ios] refactored

[ios] filter -> NSPredicate

[ios] fixed mbgl::Any/AllFilter -> NSPredicate

[ios] translate nested mbgl::NotIn filters

[ios] cleanup and added more utests

[ios] fixed a bug in the None filter conversion and improved utests

[ios, macos] doc

[macos] added missing category

[ios, macos] additional utests

[ios, macos] updated documentation
2016-09-02 22:42:05 +02:00
Jesse Bounds
0c4e51adf8 [ios] Silence MGLCalloutView related warnings in tests (#6231)
The annotation view test uses a fake MGLTestCalloutView that
declares conformance to the MGLCalloutView protocol. However,
several properties and a method were not implemented in the test
which caused several warnings that were visible if you compiled
the SDK tests. This change stubs out the properties and method
so the warnings go away.
2016-09-01 16:49:30 -07:00
Jason Wray
5a3bba6fc4 [ios] Add -ObjC to static podspec; update custom CocoaPods steps 2016-08-31 22:32:47 -04:00
Jason Wray
fcee1a85cd [ios] Allow implicit animation of annotation views
- Allows the user location annotation to again animate its movements while no tracking mode is enabled.
2016-08-31 15:55:34 -04:00
Jason Wray
dd4d1a9927 [ios] Update INSTALL doc for -ObjC; use local podspec path
- Adds -ObjC flag for static lib.
- Fixes link to iOS SDK site.
- Pushes CocoaPods down the list.
- Changes CocoaPods to use local path, not HTTP.
- Emphasizes that INSTALL.MD is only for custom builds.
2016-08-30 21:23:34 -04:00
Jesse Bounds
c95ffe65a6 [ios] Update change log for centerOffset bug fix 2016-08-30 16:57:43 -07:00
Romain Quidet
4d74e73e5e [iOS] Using contentInset for setCenterCoordinate: and flyToCamera methods everywhere. 2016-08-30 16:37:45 -07:00
Fredrik Karlsson
5588935412 [ios, macos] fix imports (#6209) 2016-08-30 17:57:36 +02:00
Jesse Bounds
22cc375da0 [ios] Avoid updating sprite backed annotations in view update method (#6199)
Previously, annotations backed by sprite had their frames updated
by the view backed annotation update method. This guards against
that by aborting an update for an annotation if an associated
view cannot be found.

In addition, some dead code is removed.
2016-08-29 16:20:29 -07:00
Jason Wray
c075a879b8 ios-v3.4.0-alpha.3 2016-08-29 14:17:18 -04:00
Jason Wray
8dff7ab2f0 [ios] Improve user location annotation documentation
- Add note to mapView:viewForAnnotation: delegate method.
- Edit docs in iosapp's implementation of that delegate method.
2016-08-26 17:48:27 -04:00
Jason Wray
018f395442 [ios] Ignore non-conforming user location annotation views 2016-08-26 17:48:27 -04:00
Justin R. Miller
2501b2cc7b [ios] preserve annotation transforms during perspective scaling 2016-08-26 14:29:31 -07:00
Jason Wray
01b0b0bf0b [ios] Move OHHTTPStubs to Git submodule and update to 5.2.0 2016-08-25 13:41:19 -04:00
Jason Wray
9cdbac043d [ios] Clean-up user location annotation heading calculations
- Use MGLRadiansFromDegrees().
- Make indentation more readable.
2016-08-24 21:56:52 -04:00
Jason Wray
cb59589954 [ios] Stop exaggerating heading accuracy indicator size
- 1.5× exaggeration has been removed.
- Maximum accuracy (smallest size) has been increased to 20°.
2016-08-24 21:56:52 -04:00
Minh Nguyễn
5836738906 Document -mapViewDidFailLoadingMap:withError: (#6145)
* [macos] Implement -mapViewDidFailLoadingMap:withError:

* [ios] Documented -mapViewDidFailLoadingMap:withError:
2016-08-24 14:47:28 -07:00
Minh Nguyễn
2523f33ac4 [ios, macos] Expose name and default position of current style (#6127)
* [ios] Reset to style’s default position

* [ios, macos] Added name property to MGLStyle
2016-08-24 11:43:54 -07:00
Thiago Marcos P. Santos
7a84a0e4ea [ios] Fix typo
s/Reponse/Response
2016-08-24 18:17:56 +03:00
Jason Wray
a5b089de62 [ios, macos] Move debug mask options to shared header (#6094)
* [ios, macos] Move debug mask options to shared header

* Limit buffer debug modes to macOS

... because these modes use OpenGL features that aren't supported by iOS.

* Try a different tact: exclude "iPhone"

... which is actually all iOS-like devices.
2016-08-23 20:14:22 -04:00
Jason Wray
fcb710fafe [ios] Disable implicit animation of user annotation pitch changes (#6122)
- Subtly improves the performance of the shadow, while performing the pitch gesture.
2016-08-23 13:59:26 -04:00
Jason Wray
c034ba4ee1 [ios, macos] Update changelog with database performance note 2016-08-23 13:26:02 -04:00
Minh Nguyễn
ea41ed0769 [ios] Segmented changes by topic 2016-08-19 17:42:37 -07:00
Minh Nguyễn
0a2fec272d [ios, macos] Updated changelogs 2016-08-19 17:33:22 -07:00
Jason Wray
da7cb247ae ios-v3.4.0-alpha.2 2016-08-19 20:03:41 -04:00
Jesse Bounds
9450323f9e [ios] Automate upload of build output to Fabric
This adds a script that automates the process of uploading the
required build output to Fabric. It requires the `FABRIC_KIT_API_KEY`
env variable and another new script called `validate-fabric-zip.sh`.
2016-08-19 16:22:42 -07:00
Jason Wray
256689a33d [ios, macos] Make Xcode 7.3 the minimum required version
- Removes nullability shims for Xcode 6.
- Removes MGLTypes.h from files where it was only being used for
  nullability support.
- Accepts that `NS_SWIFT_NAME` is not fully supported by Xcode 7.2 and
  lower.
- Adds documentation about Xcode 7.3 requirement.
2016-08-18 11:35:32 -04:00
Fredrik Karlsson
a202941360 [ios, macos] reuse utility function 2016-08-18 14:26:05 +02:00
Fredrik Karlsson
f7069523b4 [ios, macos] fixes #5974 Move style classes API to MGLStyle 2016-08-18 14:26:05 +02:00
Fredrik Karlsson
02b908633e [ios] #fixes 5961 omit style filter until it's implemented 2016-08-18 14:26:05 +02:00
Fredrik Karlsson
5d307d098b [ios, macos] Fixes #5975 Add source getter to MGLStyle 2016-08-18 14:26:04 +02:00
Konstantin Käfer
c55b9ca0f8 [build] remove unneeded ios.xcscmblueprint 2016-08-18 12:33:38 +02:00
Minh Nguyễn
61df0b1bfa [ios, macos] Use local GeoJSON for runtime styling demo
Also changed the menu item to something more descriptive.

Fixes #6021.
2016-08-17 23:16:59 -07:00
Minh Nguyễn
0062cf2f94 [ios, macos] Added MGLBaseStyleLayer_Private.h to project 2016-08-16 16:48:02 -07:00
Minh Nguyễn
5539a90c48 [ios, macos] Renamed Objective-C++ headers to .h
Also removed a redundant reference to MGLStyle_Private.h in ios.xcodeproj.

Fixes #5952.
2016-08-16 16:46:04 -07:00
Jason Wray
1de65e2a51 [ios] Improve user location annotation performance (#6019)
* [ios] Don't animate zoom-induced accuracy ring size changes

Improves perceived and actual performance by eliminating the implicit animation that occurred when the accuracy ring changed size during zooms. This previously would pile up animations as the zoom changed, causing an unsightly wobbling effect.

* [ios] Pre-calculate shadow paths for user dot and puck

Performance enhancement suggested by https://developer.apple.com/library/ios/documentation/Cocoa/Conceptual/CoreAnimation_guide/ImprovingAnimationPerformance/ImprovingAnimationPerformance.html

* [ios] Rasterize pulsating inner dot of user location annotation

Supposed performance enhancement and also improves edge smoothness.
2016-08-16 17:38:18 -04:00
Jason Wray
f489ec2ee1 [ios] Refactored user location annotation into a customizable class (#5882)
A new class, `MGLUserLocationAnnotationView`, has been added that inherits from `MGLAnnotationView`. 

Use a subclass of `MGLUserLocationAnnotationView` to customize the appearance of the user location annotation. Use your custom view with the `MGLMapView.userLocation` annotation via the `-mapView:viewForAnnotation:` delegate method.
2016-08-16 15:16:59 -04:00