Merge branch 'master' into feature/skeletons_api

This commit is contained in:
Nikita Semenov 2023-03-07 14:39:22 +03:00
commit 2c081d508f
2 changed files with 11 additions and 7 deletions

View File

@ -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
}

View File

@ -7,7 +7,7 @@ Pod::Spec.new do |s|
s.author = { 'petropavel13' => 'ivan.smolin@touchin.ru' }
s.source = { :git => 'https://github.com/TouchInstinct/LeadKit.git', :tag => s.version.to_s }
s.ios.deployment_target = '10.0'
s.ios.deployment_target = '12.0'
s.swift_versions = ['5.3']
s.source_files = s.name + '/Sources/**/*'
@ -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