yandex_mapkit icon indicating copy to clipboard operation
yandex_mapkit copied to clipboard

Ошибка добавления кластера на IOS

Open dumptyhumpty2014gmail opened this issue 2 years ago • 2 comments

Fatal Exception: NSInternalInconsistencyException 0 CoreFoundation 0xa248 __exceptionPreprocess 1 libobjc.A.dylib 0x17a68 objc_exception_throw 2 Foundation 0x54681c _userInfoForFileAndLine 3 Runner 0x164b574 -[YMKCluster appearance] 4 Runner 0x267fd04 closure #2 in ClusterizedPlacemarkCollectionController.onClusterAdded(with:) + 136 (ClusterizedPlacemarkCollectionController.swift:136) 5 Runner 0x2694724 thunk for @escaping @callee_guaranteed (@in_guaranteed Any?) -> () (<compiler-generated>) 6 Flutter 0x3d0d8 (Missing UUID 06c0b1046d24347198d4326e87347d68) 7 Flutter 0x2f5e8c (Missing UUID 06c0b1046d24347198d4326e87347d68) 8 Flutter 0x2f91c4 (Missing UUID 06c0b1046d24347198d4326e87347d68) 9 CoreFoundation 0xce66c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ 10 CoreFoundation 0x8ace8 __CFRunLoopDoTimer 11 CoreFoundation 0x2e958 __CFRunLoopDoTimers 12 CoreFoundation 0x7c2dc __CFRunLoopRun 13 CoreFoundation 0x811e4 CFRunLoopRunSpecific 14 GraphicsServices 0x1368 GSEventRunModal 15 UIKitCore 0x3a2d88 -[UIApplication _run] 16 UIKitCore 0x3a29ec UIApplicationMain 17 Runner 0x7104 main + 7 (AppDelegate.swift:7) 18 ??? 0x1bf361948 (Missing) flutter 3.3.2 yandex_mapkit 3.1.1

код добавления кластеров

final clusterizedPlacemarkCollection = ClusterizedPlacemarkCollection( mapId: mapObjectClusterId, radius: 30, minZoom: 15, onClusterAdded: (ClusterizedPlacemarkCollection self, Cluster cluster) async { return cluster.copyWith( appearance: cluster.appearance.copyWith( opacity: 0.75, icon: PlacemarkIcon.single(PlacemarkIconStyle( image: BitmapDescriptor.fromBytes( await _paintClusterMark( markText: cluster.size.toString(), ), ), scale: 1))), ); }, onClusterTap: (ClusterizedPlacemarkCollection self, Cluster cluster) async { final maxLat = cluster.placemarks.map((m) => m.point.latitude).reduce((a, b) => a < b ? b : a); final minLat = cluster.placemarks.map((m) => m.point.latitude).reduce((a, b) => a < b ? a : b); final maxLon = cluster.placemarks.map((m) => m.point.longitude).reduce((a, b) => a < b ? b : a); final minLon = cluster.placemarks.map((m) => m.point.longitude).reduce((a, b) => a < b ? a : b); const animation = MapAnimation(type: MapAnimationType.smooth, duration: 1.0); final difLat = maxLat - minLat; final difLon = maxLon - minLon; final newBounds = BoundingBox( northEast: Point(latitude: maxLat + difLat / 5, longitude: maxLon + difLon / 5), southWest: Point(latitude: minLat - difLat / 5, longitude: minLon - difLon / 5), ); await _mapController.moveCamera(CameraUpdate.newBounds(newBounds), animation: animation); }, placemarks: ordersPlacemarks, onTap: (ClusterizedPlacemarkCollection self, Point point) => print('Tapped me at $point'), );

dumptyhumpty2014gmail avatar Oct 05 '22 07:10 dumptyhumpty2014gmail

Тоже появилось после подъема до 3.1.1

overdrowe avatar Oct 13 '22 13:10 overdrowe

То же самое.

subzero911 avatar Oct 13 '22 15:10 subzero911

Здравствуйте!

Исправил в мастере, должно будет попасть в следующий релиз

DCrow avatar Oct 31 '22 07:10 DCrow

@DCrow будет ли безопасно на мастер сослаться из пабспека? Нам срочно надо.

subzero911 avatar Oct 31 '22 08:10 subzero911

@subzero911 Лучше ссылаться на определенный коммит. Последний коммит мастер ветки может меняться, и вполне возможно может появится коммит с breaking changes.

DCrow avatar Oct 31 '22 08:10 DCrow