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
Commits on Dec 8, 2016
-
[ios, macos] Source-driven attribution
Refactored MGLSource initialization. Implemented a new private class, MGLAttributionInfo, that parses an HTML attribution string from TileJSON and stores the resulting structured data. Added methods to MGLTileSet and MGLStyle to aggregate MGLAttributionInfos. On macOS, update the attribution view as soon as the source attribution changes. On iOS, fetch the current attribution information when displaying the action sheet. Removed hard-coded attribution strings.
Configuration menu - View commit details
-
Copy full SHA for 2585ba7 - Browse repository at this point
Copy the full SHA 2585ba7View commit details -
[macos] Respect inline formatting in attribution HTML
Apply a default font and color to attribution HTML as it is imported into an attributed string. Pass the attributed string into MGLAttributionButton as is, without stripping formatting. Avoid overriding the font and color after importing the HTML, in case these attributes are explicitly specified rather than intrinsic to a hyperlink. Constrain the top of the attribution view to all the attribution buttons, in case one of them needs additional headspace.
Configuration menu - View commit details
-
Copy full SHA for 8815588 - Browse repository at this point
Copy the full SHA 8815588View commit details -
[ios, macos] Display unlinked attribution strings
Unlinked attribution strings are represented on macOS as buttons that have the default cursor and do nothing when clicked. On iOS, they are action sheet buttons that do nothing but dismiss the action sheet.
Configuration menu - View commit details
-
Copy full SHA for 567692b - Browse repository at this point
Copy the full SHA 567692bView commit details -
[macos] Fixed random Auto Layout exception
Auto Layout randomly finds itself unable to satisfy constraints when updating attribution, due to some spurious constraints between attribution buttons. Regenerate the entire attribution view every time the source attribution changes.
Configuration menu - View commit details
-
Copy full SHA for 8e2852a - Browse repository at this point
Copy the full SHA 8e2852aView commit details -
[ios, macos] Thoroughly dedupe attribution infos
Also added a test to verify parity with the GL JS implementation. This implementation avoids sorting.
Configuration menu - View commit details
-
Copy full SHA for 9d8036b - Browse repository at this point
Copy the full SHA 9d8036bView commit details -
[ios, macos] Trim whitespace from attribution strings
Also added parsing tests.
Configuration menu - View commit details
-
Copy full SHA for b85d48e - Browse repository at this point
Copy the full SHA b85d48eView commit details -
[ios, macos] Added attribution parsing tests for styles
Included an emoji test to ensure that attribution strings are interpreted as UTF-8, to avoid mojibake. Included a test of removing the underline from a leading copyright symbol.
Configuration menu - View commit details
-
Copy full SHA for 1c3138e - Browse repository at this point
Copy the full SHA 1c3138eView commit details -
[ios, macos] Derive feedback link from source
MGLAttributionInfo now detects feedback links in the attribution HTML code, and it is responsible for tailoring the feedback URL to the current viewport. Removed the hard-coded feedback action from the attribution sheet on iOS in favor of a source-derived feedback title and URL. Moved the feedback action from macosapp to MGLMapView; applications are now expected to hook an Improve This Map menu item to an MGLMapView action.
Configuration menu - View commit details
-
Copy full SHA for 33c7470 - Browse repository at this point
Copy the full SHA 33c7470View commit details
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.