I have an array of location coordinates like this
let coodinatesArray: [CLLocationCoordinate2D] = [
CLLocationCoordinate2DMake(-37.986866915266461, 145.0646907496548),
CLLocationCoordinate2DMake(-30.082868871929833, 132.65902204771416),
CLLocationCoordinate2DMake(-21.493671405743246, 120.25335334577362),
CLLocationCoordinate2DMake(-20.311181400000002, 118.58011809999996),
CLLocationCoordinate2DMake(-20.311183981008153, 118.58011757850542),
CLLocationCoordinate2DMake(-8.3154534852154622, 119.32445770062185),
CLLocationCoordinate2DMake(4.0574731310941274, 120.06879782273836),
CLLocationCoordinate2DMake(16.244430153007979, 120.68908125783528),
CLLocationCoordinate2DMake(27.722556142642798, 121.4334213799517),
CLLocationCoordinate2DMake(37.513067999999976, 122.12041999999997)
]
I found some answers 1, 2 but I cannot use it since my array is not Equatable
. Is it possible to remove it using filter
in swift for arrays?