mapbox / mapbox/mapbox-maps-flutter
When i use "scaleExpression" inside LocationPuck2D it crashed in iOS device and works well with Android.
まだ誰も着手していません。
- 主要言語
- Dart
- スター
- 380
- フォーク
- 204
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Below is my code snippet which i am using to get location update in app.
Initially i wasn't able to adjust location pin size but later i found that if i give some value as a String to "scaleExpression" it changes the size of pin.
But it works only on android devices. On iOS device app gets crash with error().
This is code which i am using in my app.
mapboxMap.location.updateSettings(LocationComponentSettings(
enabled: true,
// puckBearingEnabled: true,
puckBearingSource: PuckBearingSource.COURSE,
locationPuck: LocationPuck(
locationPuck2D: LocationPuck2D(
bearingImage: null,
shadowImage: null,
topImage: list,
scaleExpression: '2')),
));
This is Error msg getting while app crash on iOS Device.
mapbox_maps_flutter/LocationController.swift:75: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a number instead.", underlyingError: nil))
mapbox_maps_flutter/LocationController.swift:75: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a number instead.", underlyingError: nil))
thread #1, queue = 'com.apple.main-thread', stop reason = Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [], debugDescription: "Expected to decode Array<Any> but found a number instead.", underlyingError: nil))
frame #0: 0x0000000186a9bebc libswiftCore.dylib_swift_runtime_on_report
libswiftCore.dylib:
-> 0x186a9bebc <+0>: ret
libswiftCore.dylib:
0x186a9bec0 <+0>: b 0x186a9bebc ; _swift_runtime_on_report
libswiftCore.dylib:
0x186a9bec4 <+0>: adrp x8, 462002
0x186a9bec8 <+4>: ldrb w0, [x8, #0x2cc]
Target 0: (Runner) stopped.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
提供された Flutter の再現手順から始め、scaleExpression を LocationPuck2D から、iOS のデコード失敗が報告されている LocationController.swift:75 まで追跡します。Android と iOS で値がどのように処理されるかを比較します。iOS デバイスで設定によるクラッシュが発生しなくなり、Android の動作が維持されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- dart, flutter, swift
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 35/100