contains method

Future<bool> contains(
  1. LatLng target
)

Implementation

Future<bool> contains(LatLng target) {
  return platform(
    android: (_) async {
      final latLng =
          await createcom_amap_api_maps_model_LatLng__double__double(
              target.latitude, target.longitude);
      return _androidModel.contains(latLng);
    },
    ios: (_) async {
      final latLng = await CLLocationCoordinate2D.create(
          target.latitude, target.longitude);
      final point = await MAMapPointForCoordinate(latLng);
      final bounds = await _iosModel.get_points();
      return MAPolygonContainsPoint(point, bounds, bounds.length);
    },
  );
}