default zoom, reduce by one
This commit is contained in:
parent
9e55a33882
commit
303734daaa
2 changed files with 6 additions and 6 deletions
|
|
@ -25,8 +25,7 @@ fun createFactorioMap() = Maps {
|
||||||
margin = 10.px
|
margin = 10.px
|
||||||
|
|
||||||
configureLeafletMap {
|
configureLeafletMap {
|
||||||
setView(LatLng(0, 0), 1)
|
setView(center = LatLng(0, 0), zoom = 0)
|
||||||
|
|
||||||
|
|
||||||
L.tileLayer(
|
L.tileLayer(
|
||||||
"""http://localhost:9073/tiles/s1/z{z}/x{x}/y{y}.png"""
|
"""http://localhost:9073/tiles/s1/z{z}/x{x}/y{y}.png"""
|
||||||
|
|
@ -38,10 +37,8 @@ fun createFactorioMap() = Maps {
|
||||||
minZoom = -2
|
minZoom = -2
|
||||||
maxZoom = 6
|
maxZoom = 6
|
||||||
|
|
||||||
// NOTE: offset the zoom, so 1 meter = 1 tile
|
|
||||||
maxNativeZoom = 3
|
maxNativeZoom = 3
|
||||||
minNativeZoom = -1
|
minNativeZoom = -1
|
||||||
// zoomOffset = 1
|
|
||||||
|
|
||||||
noWrap = true
|
noWrap = true
|
||||||
updateWhenIdle = false
|
updateWhenIdle = false
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,10 @@ class PlayerState(
|
||||||
val name = update.name ?: playerDetails.name
|
val name = update.name ?: playerDetails.name
|
||||||
|
|
||||||
return when {
|
return when {
|
||||||
position != null && surfaceIndex != null && colour != null && name != null ->
|
position != null
|
||||||
|
&& surfaceIndex != null
|
||||||
|
&& colour != null
|
||||||
|
&& name != null ->
|
||||||
PlayerDetailsState.Known(
|
PlayerDetailsState.Known(
|
||||||
index = playerDetails.index,
|
index = playerDetails.index,
|
||||||
position = position,
|
position = position,
|
||||||
|
|
@ -108,7 +111,7 @@ class PlayerState(
|
||||||
name = name,
|
name = name,
|
||||||
)
|
)
|
||||||
|
|
||||||
else ->
|
else ->
|
||||||
PlayerDetailsState.Unknown(
|
PlayerDetailsState.Unknown(
|
||||||
index = playerDetails.index,
|
index = playerDetails.index,
|
||||||
position = position,
|
position = position,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue