Commit Graph

9 Commits

Author SHA1 Message Date
Julian Rex
b460efdf00 [ios] Partially offscreen annotations (without callouts) are no longer moved on-screen (#13727) 2019-01-22 17:45:06 -05:00
Chris Loer
662a495561 [docs] EnterIdle -> BecomeIdle 2018-12-11 11:46:16 -08:00
Chris Loer
70c2d5a4ca [core, darwin, android] Add onDidEnterIdle to MapObserver.
didEnterIdle fires whenever render completes and no repaint is scheduled.
2018-12-11 11:46:16 -08:00
Jordan Kiley
7fc872b797 Add enabled property to MGLShape (#12352)
* [ios, macos] Add -[MGLMapViewDelegate mapView:canSelectAnnotation:] method.

* [ios, macos] Update changelogs.

* [ios, macos] Add mapView:canSelect: integration tests.

* [ios, macos] Change semantics to shape annotations.

* [ios, macos] Update changelogs.

* [ios, macos] Update shapeAnnotationIsEnabled documentation, improve code readability.
2018-08-20 16:30:03 -07:00
Julian Rex
5b5549d644 [ios, macos] Fix for camera movement when selecting visible annotations (#11731) 2018-04-24 11:01:04 -04:00
Jesse Bounds
9340b4822a [ios, macos] Add Swift integration tests for map view delegate 2017-04-13 14:52:15 -04:00
Konstantin Käfer
62ea1f2185 [core] remove trailing whitespace, add trailing newlines, add space after // 2017-01-27 11:44:16 +01:00
Minh Nguyễn
fe53af7de0 [ios, macos] Source-driven attribution (#5999)
* [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.

* [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.

* [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.

* [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.

* [ios, macos] Thoroughly dedupe attribution infos

Also added a test to verify parity with the GL JS implementation. This implementation avoids sorting.

* [ios, macos] Trim whitespace from attribution strings

Also added parsing tests.

* [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.

* [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.
2016-12-08 17:43:17 -08:00
Minh Nguyễn
b9702ef41a [macos] Renamed OS X SDK to macOS SDK
Also renamed as many references to OS X as possible to macOS in documentation.
2016-06-14 10:02:06 +02:00