Commit Graph

17 Commits

Author SHA1 Message Date
Fabian Guerra Soto
8a5cc3560a [ios] MGLAnnotationView annotation property made writable (#8139) 2017-03-02 18:19:23 -05:00
Konstantin Käfer
62ea1f2185 [core] remove trailing whitespace, add trailing newlines, add space after // 2017-01-27 11:44:16 +01:00
Fredrik Karlsson
2c7569b879 [ios, macos] features and annotations now conforms to NSSecureCoding 2016-12-22 13:58:45 +01: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
Jason Wray
2f3d77538b [ios, macos] Reorganize jazzy’s navigation categories; cleanup docs (#5660)
An attempt to better surface relevant information. Includes slight cleanups of inline documentation.

- Demotes MGLMapDebugMaskOptions to "Other Enums”.
- Demotes MGLMapViewDecelerationRate* and MGLStyleDefaultVersion to "Other Constants”.
- Demotes MGLOfflinePack's less significant global types.
- Demotes MGLAnnotationVerticalAlignment and documents its usage caveat.
- Demotes MGLAnnotationViewDragState and removes extra asterisk.
- Adds note to `MGLUserTrackingMode` about usage with `MGLMapView.userTrackingMode`.
- MGLAccountManager is currently only used for access tokens.
- Adds missing closing bracket.
2016-07-12 14:19:44 -04:00
Fredrik Karlsson
7b6ef80b5d [ios] fixes #5544 support canceling a drag operation and not by default (#5561) 2016-07-05 22:47:54 +02:00
Minh Nguyễn
f2fdc23ec7 [ios] Removed MGLAnnotationView.flat
Removed MGLAnnotationView’s option to lie flat against a tilted map to work around #5090.
2016-07-02 18:41:11 -07:00
Minh Nguyễn
1f026c6246 [ios] Removed custom getter
isScaledWithViewingDistance is unnecessary.
2016-07-02 13:55:36 -07:00
Minh Nguyễn
50dd60aaf6 [ios, macos] Rewrote MGLMapViewDelegate, MGLAnnotationView docs
Reorganized MGLMapViewDelegate and MGLAnnotationView symbols into sections by task. Wrapped documentation comments at column 80 for readability.

Added documentation for -mapViewWillStartRenderingFrame: and -mapViewDidFinishRenderingFrame:fullyRendered:, which are supported and behave as expected (except for the part that has been left undocumented). Synchronized iOS and macOS documentation for MGLMapViewDelegate. Added cross-references between annotation image and annotation view delegate methods and among the various callout delegate methods.

Added missing MGLAnnotationViewDragState documentation and also added the symbol to jazzy’s table of contents. Rewrote MGLAnnotationView documentation.
2016-07-02 13:54:41 -07:00
Fredrik Karlsson
d29bef957f [ios] fixes #5036 draggable annotation views (#5373) 2016-06-24 19:42:20 +02:00
Fredrik Karlsson
d564302c6d [ios] fixes #5129 added annotation property to MGLAnnotationView (#5307)
Also added a test case for MGLAnnotationView
2016-06-14 13:12:56 +02:00
Fredrik Karlsson
a557e1e2c9 [ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView (#5297)
[ios] fixes #5127, #5128, #5130 added enabled and selected property to MGLAnnotationView
2016-06-14 10:36:41 +02:00
Jesse Bounds
c90f51a1a9 [ios] Add annotation view scaling (#5085)
This adds an option to MGLAnnotationView so that a developer can control
how their annotation views scale in size as they approach the top of
the map view (along the Y axis). The size change is also affected by
the pitch (tilt) of the map view. If there is no tilt then scaling
is not performed. As the map is tilted scaling is gradually applied.

This turns the MGLAnnotationView implementation into an Objective C++
class so that SDK constants from C++ files can be used.

The new behavior is enabled by default to maintain consistency with
annotations backed by GL sprites. The MBXViewController redundantly
sets the new property as an illustration of use.
2016-05-26 23:10:02 -07:00
frederoni
a220efcae6 [ios] Allow annotation views to be flattened (#5067)
* [ios] wip flatten annotation view

* [ios] wip flatten annotation view

* [ios] naming conventions

* [ios] removed unused property
2016-05-18 17:03:08 -07:00
frederoni
e8ea7483a7 [ios] Added centerOffset to MGLAnnotationView (#5062)
* [ios] Added centerOffset to MGLAnnotationView

* [ios] Reposition immediately after changing the centerOffset

closes #5059
2016-05-18 09:47:54 -07:00
Jesse Bounds
1ee14915f8 [ios] Add method documentation for view based annotations. 2016-05-13 15:53:04 -07:00
Jesse Bounds
39669243b7 [ios] Introduce MGLAnnotationView and support for view annotations
Add an UIView subclass that can be used as the base class for all
client provided UIViews for annotations.

Teach MGLMapView to be able to display annotation views over the map if provided by the client delegate. For now, if the delegate provides a UIView then it will be used. If not, the map view will fall back to the old strategy of using GL annotations with an image provided by the delegate or a default image if not.
The map keeps a reuse queue and will store annotation views that are panned
offscreen in the queue if the application developer supplied a reuse queue identifer. The views in the queue are reused when more annotation
views are required. This view reuse provides a performance gain when many
annotations are shown and most of them are offscreen.

iosapp now implements the new delegate method to supply
a native view.

Add a playground to the workspace to facilitate experimentation
with new features. A playground is capable of importing frameworks if it
exists in the same workspace that builds the imported framework. The
initial playground demonstrates annotation views.

This also fixes a crash due to nullptr in annotations array If the `annotations` method is called while the user dot's callout view was showing, the userdot annotation is represented as null in the annotation context map. This
caused a crash when the null pointer was attempted to be converted
into an NSArray via C array. This protects against this bug by filtering out such a null annotation.
2016-05-13 15:51:40 -07:00