updateCoordinates method
- List<
BMFCoordinate> coordinates, - {List<
int> indexs}
更新经纬度数组
List<BMFCoordinate
> coordinates polyline经纬度数组
indexs iO独有参数,分段索引(多纹理,多颜色折线请赋值), iOS在多颜色或者多纹理渲染的情况下,更新经纬度数组的同时,必须更新indexs
Implementation
Future<bool> updateCoordinates(List<BMFCoordinate> coordinates,
{List<int> indexs}) async {
if (null == coordinates) {
return false;
}
bool ret = await BMFMapDispatcherFactory.instance.overlayDispatcher
.updatePolylineMember(this.methodChannel, {
'id': this.Id,
'member': 'coordinates',
'value': coordinates?.map((coordinate) => coordinate?.toMap())?.toList(),
'indexs': indexs?.map((index) => index)?.toList()
});
if (ret) {
this.coordinates = coordinates;
}
return ret;
}