Create UI component for Iss Location Map

This commit is contained in:
Shreyas 2021-06-06 23:45:21 +05:30
parent 6628fe97b4
commit addcd64f06

View file

@ -0,0 +1,24 @@
package components
import com.surrus.common.remote.IssPosition
import components.materialui.Map
import components.materialui.Marker
import react.RBuilder
fun RBuilder.IssLocationMap(issPosition: IssPosition) {
val locationCoordinates = arrayOf(issPosition.latitude, issPosition.longitude)
Map {
attrs {
height = 300
defaultZoom = 4
defaultCenter = locationCoordinates
}
Marker {
attrs {
width = 50
anchor = locationCoordinates
}
}
}
}