I have a problen
Our developer ios has coded this function as follows
let topLeft = mapView.projection.coordinate(for: mapView.bounds.origin)
let bottomLeft = mapView.projection.coordinate(for: .init(x: mapView.bounds.minX, y: mapView.bounds.maxY))
let distance = GMSGeometryDistance(topLeft, bottomLeft)
This is the introduction of function GMSGeometryDistance in iOs
/**
* Returns the great circle distance between two coordinates, in meters, on Earth.
*
* This is the shortest distance between the two coordinates on the sphere.
*
* Both coordinates must be valid.
*/
FOUNDATION_EXPORT
CLLocationDistance GMSGeometryDistance(CLLocationCoordinate2D from, CLLocationCoordinate2D to);
I want to do this on google maps of android.
HOW TO CONVERT TO JAVA OR KOTLIN IN ANDROID.
Thanks you.