Код: Выделить всё
mapFragment.getMapAsync { tomtomMap: TomTomMap ->
val loc:GeoPoint = tomtommap.currentLocation!!.position
val markerOptions =
MarkerOptions(
coordinate = loc,
tag = "Tag",
pinImage = ImageFactory.fromResource(R.drawable.children),
pinIconImage = ImageFactory.fromResource(R.drawable.children),
)
tomtomMap.addMarker(markerOptions)
}
Вот как теперь выглядят MarkerOptions:
Код: Выделить всё
data class MarkerOptions(
val coordinate: GeoPoint,
val pinImage: Int,
val pinIconImage: Int,
val shieldImage: Image? = null,
val tag: String? = null,
val label: Label? = null,
val balloonText: String = ""
)
Код: Выделить всё
data class MarkerOptions(
val coordinate: GeoPoint,
val pinImage: Image,
val pinIconImage: Image? = null,
val shieldImage: Image? = null,
val tag: String? = null,
val label: Label? = null,
val balloonText: String = ""
)
Подробнее здесь: https://stackoverflow.com/questions/785 ... -up-on-map
Мобильная версия