Merge pull request #53 from TouchInstinct/fix/yandex_map
fix/yandex_map
This commit is contained in:
commit
b1989ad300
|
|
@ -53,11 +53,14 @@ dependencies {
|
|||
implementation project(':lifecycle')
|
||||
implementation project(':lifecycle-rx')
|
||||
implementation project(':navigation')
|
||||
implementation project(':templates')
|
||||
implementation project(':recyclerview-adapters')
|
||||
implementation project(':recyclerview-calendar')
|
||||
implementation project(':kotlin-extensions')
|
||||
implementation project(':livedata-location')
|
||||
implementation project(':tabbar-navigation')
|
||||
implementation project(':base-map')
|
||||
implementation project(':yandex-map')
|
||||
implementation project(':google-map')
|
||||
}
|
||||
```
|
||||
Можно подключать только те модули, которые вам необходимы.
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue