updateCoordinates method

Future<bool> updateCoordinates (
  1. List<BMFCoordinate> coordinates,
  2. {List<int> indexs}
)

更新经纬度数组

List<BMFCoordinate> coordinates polyline经纬度数组

indexs 分段索引(多纹理,多颜色折线请赋值),iOS在多颜色或者多纹理渲染的情况下,更新经纬度数组的同时,必须更新indexs

Implementation

Future<bool> updateCoordinates(List<BMFCoordinate> coordinates,
    {List<int> indexs}) async {
  if (null == coordinates) {
    return false;
  }

  this.coordinates = coordinates;

  return await BMFMapDispatcherFactory.instance
      .getOverlayDispatcher()
      .updateOverlayMemberDispatch(this.getMethodChannel(), {
    'id': this.getId(),
    'member': 'coordinates',
    'value': coordinates.map((coordinate) => coordinate?.toMap())?.toList(),
    'indexs': indexs?.map((index) => index)?.toList()
  });
}