1. 程式人生 > 實用技巧 >ios百度地圖sdk 網格_使用sdk v6地圖支援ios14大概位置2 0

ios百度地圖sdk 網格_使用sdk v6地圖支援ios14大概位置2 0

ios百度地圖sdk 網格

Developers can begin working with Mapbox iOS SDK version v6.2.0-beta.1 to fully support Apple iOS14, including Approximate Location. This prerelease tracks the current iOS14 beta. We recommend that iOS developers begin using Mapbox SDK v6.2.0 as soon as possible to update their apps, providing a smooth experience for users when iOS14 is released.

開發人員可以開始使用Mapbox iOS SDK版本v6.2.0-beta.1來完全支援Apple iOS14,包括“近似位置”。 此預發行版跟蹤當前的iOS14 beta。 我們建議iOS開發人員儘快開始使用Mapbox SDK v6.2.0更新其應用程式,以便在iOS14釋出時為使用者提供流暢的體驗。

iOS14’s Approximate Location feature allows users to reduce the precision of location data shared with an app. When a user enables Approximate Location for an app, it will receive obfuscated data instead of the user’s exact location — only the general area of the end user will be reported, rather than the precise location data available in previous iOS versions. The size of this area will vary between dense urban areas and less populous ones. Apple has suggested that a typical size for the area is a 5km radius. Approximate Location reduces location data’s frequency, too: when enabled, location is recomputed about four times per hour. A thorough discussion of Approximate Location can be found in the

What’s New In Location talk from this year’s WWDC.

iOS14的“近似位置”功能使使用者可以降低與應用共享的位置資料的精度。 當用戶為應用程式啟用“近似位置”時,它將接收混淆的資料,而不是使用者的確切位置-僅報告終端使用者的一般區域,而不是先前iOS版本中可用的精確位置資料。 該區域的大小將在人口稠密的城市地區和人口較少的城市地區之間變化。 蘋果公司建議該區域的典型大小是半徑5公里。 近似位置也降低了位置資料的頻率:啟用後,每小時大約重新計算位置四次。 有關近似位置的詳細討論,請參見今年WWDC 的“位置中的新功能”演講。

Mapbox iOS SDK version v6.2.0 fully supports iOS Approximate Location by wrapping and augmenting the iOS CoreLocation API, making it easier for developers to build in iOS14 while avoiding the negative user experiences that Approximate Location can cause. Notable features include:

Mapbox iOS SDK版本v6.2.0通過包裝和擴充套件iOS CoreLocation API完全支援iOS近似位置,這使開發人員可以更輕鬆地在iOS14中進行構建,同時避免了近似位置可能引起的負面使用者體驗。 值得注意的功能包括:

  • [MGLMapViewDelegate mapView:didChangeLocationManagerAuthorization:] allows apps to take action whenever an end user enables or disables Approximate Location.

    [MGLMapViewDelegate mapView:didChangeLocationManagerAuthorization:]允許應用程式在終端使用者啟用或禁用“近似位置”時採取措施。

  • [MGLLocationManager.accuracyAuthorization] reflects the level of precision that the end user has authorized.

    [MGLLocationManager.accuracyAuthorization]反映了終端使用者已授權的精度級別。

  • Developers may request temporary access to full-precision location information with [MGLLocationManager.requestTemporaryFullAccuracyAuthorizationWithPurposeKey:].

    開發人員可以使用[MGLLocationManager.requestTemporaryFullAccuracyAuthorizationWithPurposeKey:]來請求對精確位置資訊的臨時訪問。

  • When an MGLUserTrackingMode that requires precise user location is enabled, the SDK will automatically check for and, if needed, prompt the user to grant permission.

    啟用要求精確使用者位置的MGLUserTrackingMode時 ,SDK將自動檢查並在需要時提示使用者授予許可權。

  • User location annotations will automatically reflect when precise location data is not available.

    當沒有精確的位置資料時,使用者位置註釋將自動反映。

Approximate Location will bring valuable new privacy controls to end users. But it also means that apps that use location data will risk delivering bad user experiences if they do not prepare for scenarios in which Approximate Location is enabled.

近似位置將為終端使用者帶來有價值的新隱私控制。 但這也意味著使用位置資料的應用程式如果不為啟用“近似位置”的方案做好準備,就有可能帶來糟糕的使用者體驗。

iOS precise location permissions dialog with options “allow once” “turn on in settings” and “keep precise location off”
An app’s access to precise location data can be enabled during the initial request for location data; later, in-app on a temporary basis; or permanently, at any time, in the app’s system settings.
可以在初始請求位置資料期間啟用應用對精確位置資料的訪問; 稍後,在應用內進行臨時播放; 或永久地(在任何時候)在應用程式的系統設定中。

Many location use cases require precise location data. Features like navigation, displaying user location, or fitness tracking will behave in undesirable ways or become unusable when Approximate Location is enabled. Examples of undesirable or unexpected behaviors that apps should plan to address:

許多位置用例需要精確的位置資料。 啟用“近似位置”後,導航,顯示使用者位置或健身跟蹤等功能將以不良方式執行或無法使用。 應用程式應計劃解決的不良或意外行為的示例:

  • Confusing user location sharing. If end users share their location with others and the app does not have a way to mark a shared location as precise or approximate, users may have confusing and problematic interactions. Example: two users attempting to meet up at a location are confused by an approximate shared location.

    令人困惑的使用者位置共享。 如果終端使用者與其他人共享他們的位置,而該應用程式無法將共享位置標記為精確或近似,則使用者可能會感到困惑和麻煩。 示例:兩個試圖在某個位置集合的使用者被一個近似的共享位置所迷惑。

  • Unusable navigation. Navigation workflows rely on a frequently updated measurement of the end user’s precise location in order to position the map, detect the need for route recalculation, monitor speed and provide prompts for upcoming maneuvers. Approximate Location provides updates with insufficient precision and frequency for any of these tasks. Example: a user launches an automotive navigation feature with approximate location enabled, causing their position to appear stationary even though their car begins moving.

    無法使用的導航。 導航工作流依賴於對終端使用者精確位置的頻繁更新測量,以便定位地圖,檢測對路線重新計算的需求,監控速度併為即將進行的操作提供提示。 “近似位置”無法為這些任務中的任何一項提供足夠的準確性和頻率更新。 示例:使用者啟動啟用了大致位置的汽車導航功能,即使他們的汽車開始移動,也會導致他們的位置顯得靜止。

  • Unexpected location information. End users may regard Approximate Location information as incorrect. Example: an end user is surprised to see their social media posts tagged as originating from a place they have never visited.

    意外的位置資訊。 終端使用者可能認為“近似位置”資訊不正確。 示例:終端使用者驚訝地看到自己的社交媒體帖子被標記為源自他們從未訪問過的地方。

  • Data pollution. If an app publishes and stores user location data and does not have a way to detect location data’s level of precision, it may not be able to easily filter out data points collected while Approximate Location is turned on. Example: an app collecting fitness data in the background reports inaccurate metrics (e.g. average walking pace) by failing to discard data collected while Approximate Location is enabled.

    資料汙染。 如果應用釋出並存儲使用者位置資料,但無法檢測位置資料的精確度,則可能無法在“近似位置”開啟時輕鬆過濾掉收集的資料點。 示例:在後臺收集健身資料的應用通過在啟用“近似位置”時無法丟棄收集的資料,報告了不準確的指標(例如,平均步行速度)。

The default state of iOS14’s location permission UI will allow the collection of precise location data, and previously installed apps will retain their already-granted access to precise location information when users upgrade to iOS14. But developers should still check if precise location data is available before their apps launch features that depend on it.

iOS14的位置許可UI的預設狀態將允許收集精確的位置資料,並且當用戶升級到iOS14時,以前安裝的應用將保留對精確位置資訊的已授予訪問許可權。 但是,開發人員仍應在其應用程式啟動依賴於此的功能之前,檢查精確的位置資料是否可用。

When precise location is needed but unavailable, developers must ask the end user for access to it, whether through a temporary authorization or a change in the app’s system settings. Developers also need to account for changes in location precision at unexpected times, since users may visit an app’s system settings and disable its access to precise location data whenever they wish. The Mapbox SDK offers ways to detect when such changes occur.

當需要精確位置但不可用時,開發人員必須要求終端使用者訪問該位置,無論是通過臨時授權還是通過更改應用程式的系統設定。 開發人員還需要在意外的時間考慮位置精度的變化,因為使用者可以隨時訪問應用程式的系統設定並禁用對精確位置資料的訪問。 Mapbox SDK提供了檢測何時發生此類更改的方法。

iOS14 app settings dialog, which includes new options for location data use by widgets and precise location
In iOS14, an app’s system settings will include a toggle for Precise Location data.
在iOS14中,應用的系統設定將包含“精確位置”資料的切換。

App developers need to upgrade to Mapbox iOS SDK version v6.2.0 or later to fully support iOS Approximate Location. Previous versions of the Mapbox SDK do not support iOS Approximate Location. There are no plans to backport these changes to any previous versions of the SDK.

應用開發人員需要升級到Mapbox iOS SDK版本v6.2.0或更高版本,以完全支援iOS近似位置。 Mapbox SDK的早期版本不支援iOS近似位置。 沒有計劃將這些更改回移植到任何早期版本的SDK。

Please note that iOS14 is still in beta and subject to change. A public release date for iOS14 has not been announced but is generally believed to be imminent. More details are expected at Apple’s recently announced event on September 15. We will be tracking Apple’s preview releases closely and adjusting as needed.

請注意,iOS14仍處於測試階段,可能會發生變化。 iOS14的公開發布日期尚未公佈,但一般認為即將到來。 預計將在9月15日蘋果公司最近宣佈的活動中獲得更多細節。我們將密切跟蹤Apple的預覽版本,並根據需要進行調整。

Download the release, read the detailed docs, and keep an eye on the blog for additional updates to our Maps SDK.

下載版本閱讀詳細的文件 ,並關注部落格,以獲取對我們的Maps SDK的其他更新。

翻譯自: https://blog.mapbox.com/supporting-ios14-approximate-location-with-maps-sdk-v6-2-0-c0863f10efe8

ios百度地圖sdk 網格