convertPoint_ method
Converts a point in the given view’s coordinate system to a geographic coordinate.
@param point The point to convert. @param view The view in whose coordinate system the point is expressed. @return The geographic coordinate at the given point.
Related examples
- TODO: Point conversion example to learn how to convert a
CGPointto a map coordinate.
Implementation
CLLocationCoordinate2D convertPoint_(objc.CGPoint point, {UIView? view}) {
final _ptr = pkg_ffi.calloc<CLLocationCoordinate2D>();
objc.useMsgSendVariants ? _objc_msgSend_4xp05xStret(_ptr, this.ref.pointer, _sel_convertPoint_toCoordinateFromView_, point, view?.ref.pointer ?? ffi.nullptr) : _ptr.ref = _objc_msgSend_4xp05x(this.ref.pointer, _sel_convertPoint_toCoordinateFromView_, point, view?.ref.pointer ?? ffi.nullptr);
final _finalizable = _ptr.cast<ffi.Uint8>().asTypedList(
ffi.sizeOf<CLLocationCoordinate2D>(), finalizer: pkg_ffi.calloc.nativeFree);
return ffi.Struct.create<CLLocationCoordinate2D>(_finalizable);
}