mapbox / mapbox/mapbox-maps-flutter

When i use "scaleExpression" inside LocationPuck2D it crashed in iOS device and works well with Android.

オープン
#320 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

提供された Flutter の再現手順から始め、scaleExpression を LocationPuck2D から、iOS のデコード失敗が報告されている LocationController.swift:75 まで追跡します。Android と iOS で値がどのように処理されるかを比較します。iOS デバイスで設定によるクラッシュが発生しなくなり、Android の動作が維持されれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
dart, flutter, swift
領域
mobile
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。