`YandexMapsMobile` version updated, map manager memory leak removed
This commit is contained in:
parent
e27c844f92
commit
c8a4b0bd51
|
|
@ -23,7 +23,7 @@
|
|||
import Foundation
|
||||
import UIKit.UIGeometry
|
||||
|
||||
open class BaseMapManager<Map,
|
||||
open class BaseMapManager<Map: AnyObject,
|
||||
PM: PlacemarkManager,
|
||||
CPM: PlacemarkManager,
|
||||
CUF: CameraUpdateFactory> where PM.Position: LocationCoordinate,
|
||||
|
|
@ -79,16 +79,20 @@ open class BaseMapManager<Map,
|
|||
}
|
||||
|
||||
open func set(items: [PM.DataModel]) {
|
||||
let placemarkTapHandler: PM.TapHandlerClosure = { [map, selectPlacemarkHandler, animationDuration, cameraUpdateOnMarkerTap] model, location in
|
||||
cameraUpdateOnMarkerTap?(location).update(map: map, animationDuration: animationDuration)
|
||||
let placemarkTapHandler: PM.TapHandlerClosure = { [weak map, selectPlacemarkHandler, animationDuration, cameraUpdateOnMarkerTap] model, location in
|
||||
if let map = map {
|
||||
cameraUpdateOnMarkerTap?(location).update(map: map, animationDuration: animationDuration)
|
||||
}
|
||||
|
||||
return selectPlacemarkHandler(model)
|
||||
}
|
||||
|
||||
let placemarkManagers = items.compactMap { placemarkManagerCreator($0, placemarkTapHandler) }
|
||||
|
||||
let clusterTapHandler: CPM.TapHandlerClosure = { [map, animationDuration, cameraUpdateOnClusterTap] managers, boundingBox in
|
||||
cameraUpdateOnClusterTap?(boundingBox).update(map: map, animationDuration: animationDuration)
|
||||
let clusterTapHandler: CPM.TapHandlerClosure = { [weak map, animationDuration, cameraUpdateOnClusterTap] managers, boundingBox in
|
||||
if let map = map {
|
||||
cameraUpdateOnClusterTap?(boundingBox).update(map: map, animationDuration: animationDuration)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ Pod::Spec.new do |s|
|
|||
s.pod_target_xcconfig = { 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
|
||||
|
||||
s.dependency 'TIMapUtils', s.version.to_s
|
||||
s.dependency 'YandexMapsMobile', '4.0.0-lite'
|
||||
s.dependency 'YandexMapsMobile', '4.3.1-lite'
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue