replaceCoordinatesInRange method

void replaceCoordinatesInRange(
  1. NSRange range, {
  2. required Pointer<CLLocationCoordinate2D> withCoordinates,
})

Replaces the vertices at the given range in the shape with the same number of vertices from a given C array.

If the shape is currently visible on the map as an annotation, it is redrawn immediately. If the shape is part of an MLNShapeSource object, you must explicitly set the MLNShapeSource/shape property in order for any style layers that use the source to be redrawn.

The number of coordinates in coords must be equal to the length of range. If you want to insert or delete one or more vertices, use the -replaceCoordinatesInRange:withCoordinates:count: method.

If range extends beyond the shape’s coordinates property, an NSRangeException is raised. If you want to append new vertices to the shape, use the -appendCoordinates:count: method.

@param range The range of vertices to replace. The location field indicates the first vertex you are replacing, with 0 being the first vertex, 1 being the second vertex, and so on. The length field indicates the number of vertices to replace. @param coords The array of coordinates defining part of the shape. The data in this array is copied to the shape’s coordinates property.

Implementation

void replaceCoordinatesInRange(objc.NSRange range, {required ffi.Pointer<CLLocationCoordinate2D> withCoordinates}) {
_objc_msgSend_1krtrwi(this.ref.pointer, _sel_replaceCoordinatesInRange_withCoordinates_, range, withCoordinates);

}