【问题标题】:RangeError (index): Invalid value: Not in inclusive range 0..1273: 1274RangeError(索引):无效值:不在包含范围内 0..1273:1274
【发布时间】:2021-02-04 05:58:23
【问题描述】:

我收到了这个错误。 RangeError(索引):无效值:不在包含范围 0..1273:1274

这是我的代码

 //DECODING DRIVER POLYLINES START
  void driverDPo() {
    loadDriverPoly().then((QuerySnapshot snapshot) => {
          snapshot.documents.forEach((f) {
            String polyDecodedStringDriver;
            polyDecodedStringDriver = f.data['decodedRouteString,'].toString();
            driverUid = f.data['uid'];
            print("polyDecodedStringDriver : " + polyDecodedStringDriver);
            print("Driver Uid : " + f.data['uid']); //asigning
            try {           
              result2 = polylinePointsDr
                  .decodePolyline(f.data['decodedRouteString,']);

              result2.forEach((PointLatLng point) {
                // driverPolylineCordinates
                //     .add(LatLng(point.latitude, point.longitude));
                print("DRIVER LATLONG : " +
                    LatLng(point.latitude, point.longitude).toString());
                // driverLatLng =
                //     LatLng(point.latitude, point.longitude); //asigning
              });
            } catch (e) {
              print(e);
            }
          })
        });
  }
  //DECODING DRIVER POLYLINES END

【问题讨论】:

    标签: flutter google-maps


    【解决方案1】:

    我找到了答案。我从谷歌地图存储了overview_polyline。我想将其与实时位置进行比较。这时异常来了。我在互联网上没有找到任何解决方案。我检查了谷歌地图,当时我看到我之前存储的根目录已关闭。我认为这就是异常的原因。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-03-21
      • 2021-10-07
      • 2021-07-08
      • 2021-08-14
      • 2019-11-01
      • 2020-07-06
      • 2020-07-05
      • 1970-01-01
      相关资源
      最近更新 更多