* [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.
76 lines
2.2 KiB
Plaintext
76 lines
2.2 KiB
Plaintext
/* Accessibility hint */
|
||
"ANNOTATION_A11Y_HINT" = "Shows more info";
|
||
|
||
/* No comment provided by engineer. */
|
||
"API_CLIENT_400_DESC" = "The session data task failed. Original request was: %@";
|
||
|
||
/* No comment provided by engineer. */
|
||
"API_CLIENT_400_REASON" = "The status code was %ld";
|
||
|
||
/* No comment provided by engineer. */
|
||
"CANCEL" = "Cancel";
|
||
|
||
/* Accessibility hint */
|
||
"COMPASS_A11Y_HINT" = "Rotates the map to face due north";
|
||
|
||
/* Accessibility label */
|
||
"COMPASS_A11Y_LABEL" = "Compass";
|
||
|
||
/* Compass abbreviation for north */
|
||
"COMPASS_NORTH" = "N";
|
||
|
||
/* Instructions in Interface Builder designable; {key}, {plist file name} */
|
||
"DESIGNABLE" = "To display a Mapbox-hosted map here, set %1$@ to your access token in %2$@\n\nFor detailed instructions, see:";
|
||
|
||
/* Setup documentation URL display string; keep as short as possible */
|
||
"FIRST_STEPS_URL" = "mapbox.com/help/first-steps-ios-sdk";
|
||
|
||
/* Accessibility hint */
|
||
"INFO_A11Y_HINT" = "Shows credits, a feedback form, and more";
|
||
|
||
/* Accessibility label */
|
||
"INFO_A11Y_LABEL" = "About this map";
|
||
|
||
/* Accessibility label */
|
||
"LOGO_A11Y_LABEL" = "Mapbox";
|
||
|
||
/* Accessibility label */
|
||
"MAP_A11Y_LABEL" = "Map";
|
||
|
||
/* Map accessibility value */
|
||
"MAP_A11Y_VALUE" = "Zoom %1$dx\n%2$ld annotation(s) visible";
|
||
|
||
/* Action sheet title */
|
||
"SDK_NAME" = "Mapbox iOS SDK";
|
||
|
||
/* Telemetry prompt message */
|
||
"TELEMETRY_DISABLED_MSG" = "You can help make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
|
||
|
||
/* Telemetry prompt button */
|
||
"TELEMETRY_DISABLED_OFF" = "Don’t Participate";
|
||
|
||
/* Telemetry prompt button */
|
||
"TELEMETRY_DISABLED_ON" = "Participate";
|
||
|
||
/* Telemetry prompt message */
|
||
"TELEMETRY_ENABLED_MSG" = "You are helping to make OpenStreetMap and Mapbox maps better by contributing anonymous usage data.";
|
||
|
||
/* Telemetry prompt button */
|
||
"TELEMETRY_ENABLED_OFF" = "Stop Participating";
|
||
|
||
/* Telemetry prompt button */
|
||
"TELEMETRY_ENABLED_ON" = "Keep Participating";
|
||
|
||
/* Telemetry prompt button */
|
||
"TELEMETRY_MORE" = "Tell Me More";
|
||
|
||
/* Action in attribution sheet */
|
||
"TELEMETRY_NAME" = "Mapbox Telemetry";
|
||
|
||
/* Telemetry prompt title */
|
||
"TELEMETRY_TITLE" = "Make Mapbox Maps Better";
|
||
|
||
/* Default user location annotation title */
|
||
"USER_DOT_TITLE" = "You Are Here";
|
||
|