Test if two pairs of latitude/longitude coordinates match each other.
Parameters
$a
arrayrequired- The first pair, with indexes
'latitude'
and'longitude'
. $b
arrayrequired- The second pair, with indexes
'latitude'
and'longitude'
.
Source
protected function coordinates_match( $a, $b ) {
if ( ! isset( $a['latitude'], $a['longitude'], $b['latitude'], $b['longitude'] ) ) {
return false;
}
return $a['latitude'] === $b['latitude'] && $a['longitude'] === $b['longitude'];
}
Changelog
Version | Description |
---|---|
4.8.0 | Introduced. |
User Contributed Notes
You must log in before being able to contribute a note or feedback.