diff --git a/web/src/main/kotlin/components/IssLocationMap.kt b/web/src/main/kotlin/components/IssLocationMap.kt new file mode 100644 index 0000000..1b9c98c --- /dev/null +++ b/web/src/main/kotlin/components/IssLocationMap.kt @@ -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 + } + } + } +} \ No newline at end of file