This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Geometry formatters and value methods #4802
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ec5
added
feature
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
navigation
For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
labels
Apr 22, 2016
1ec5
force-pushed
the
1ec5-formatters-4485
branch
from
April 22, 2016 16:44
c2accc0
to
42e72d2
Compare
👍 |
Added category methods on NSValue for converting to and from the structure types defined in MGLGeometry.h. Fixes #4485.
Added a degree-minute-second coordinate formatter for general use. Use this formatter in iosapp and osxapp. Added unit tests for the coordinate formatter and for round-tripping geometry types through NSValue.
Implemented an NSFormatter for formatting CLLocationDirection values as localizable display strings. The formatter supports both absolute compass directions, such as “south”, and relative “clock” directions, such as “6 o’clock”.
1ec5
force-pushed
the
1ec5-formatters-4485
branch
from
April 22, 2016 18:13
42e72d2
to
5984c89
Compare
Split MGLDirectionFormatter into MGLClockDirectionFormatter, which specializes in clock positions, and MGLCompassDirectionFormatter, which boxes the compass. This neatly avoids any confusion that might arise if the developer fails to read the documentation and thinks the original unified formatter can convert between the two types of directions.
1ec5
force-pushed
the
1ec5-formatters-4485
branch
from
April 22, 2016 18:29
5984c89
to
2a1a5f0
Compare
The new |
Consolidated NSValue categories to work around realm/jazzy#539. Documented MGLErrorCode. Moved jazzy configuration file into platform/ios/. Removed redundant include/Mapbox.h that was only being used by jazzy, now that the static frameworks’s umbrella header is based on that of the dynamic framework. Moved framework/Mapbox.h to include/Mapbox.h for consistency.
14 tasks
This was referenced Apr 24, 2016
Merged
Closed
/sub |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
feature
iOS
Mapbox Maps SDK for iOS
macOS
Mapbox Maps SDK for macOS
navigation
For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented a degree-minute-second coordinate formatter for general use. This formatter replaces redundant implementations in iosapp and osxapp. Implemented NSFormatters for formatting
CLLocationDirection
values as localizable display strings: one for compass directions, such as “south”, and one for relative clock positions, such as “6 o’clock”.These formatters are a cleaner implementation of the format strings implemented in #1496 for VoiceOver support. They may also be useful for navigation use cases.
Added category methods on NSValue for converting to and from the structure types defined in MGLGeometry.h.
Fixes #4485.
/cc @friedbunny @boundsj