moved method "setApiKey"

This commit is contained in:
Oleg Kuznetsov 2019-08-19 14:06:58 +03:00
parent fef8ce13bf
commit 9965f5fa22
1 changed files with 4 additions and 2 deletions

View File

@ -17,13 +17,16 @@ import ru.touchin.basemap.AbstractMapManager
class YandexMapManager(
mapView: MapView,
apiKey: String,
private val isDebug: Boolean = false
) : AbstractMapManager<MapView, Map, Point>(mapView), MapLoadedListener, CameraListener, InputListener {
companion object {
private const val CAMERA_ANIMATION_DURATION = 1f
private const val CAMERA_OFFSET_ZOOM = 3f
// Call in Application.onCreate()
fun setApiKey(apiKey: String) = MapKitFactory.setApiKey(apiKey)
}
private val userLocationLayer by lazy {
@ -31,7 +34,6 @@ class YandexMapManager(
}
init {
MapKitFactory.setApiKey(apiKey)
MapKitFactory.initialize(mapView.context)
}