mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-30 02:44:56 +01:00
Updating the pin for user location
This commit is contained in:
parent
a4211d8482
commit
81cb0d40c6
@ -103,9 +103,11 @@ class MapTilerMapView @JvmOverloads constructor(
|
|||||||
|
|
||||||
private fun initMapStyle(map: MapboxMap, url: String) {
|
private fun initMapStyle(map: MapboxMap, url: String) {
|
||||||
map.setStyle(url) { style ->
|
map.setStyle(url) { style ->
|
||||||
|
val symbolManager = SymbolManager(this, map, style)
|
||||||
|
symbolManager.iconAllowOverlap = true
|
||||||
mapRefs = MapRefs(
|
mapRefs = MapRefs(
|
||||||
map,
|
map,
|
||||||
SymbolManager(this, map, style),
|
symbolManager,
|
||||||
style
|
style
|
||||||
)
|
)
|
||||||
pendingState?.let { render(it) }
|
pendingState?.let { render(it) }
|
||||||
|
@ -45,13 +45,11 @@ class LocationPreviewViewModel @AssistedInject constructor(
|
|||||||
companion object : MavericksViewModelFactory<LocationPreviewViewModel, LocationPreviewViewState> by hiltMavericksViewModelFactory()
|
companion object : MavericksViewModelFactory<LocationPreviewViewModel, LocationPreviewViewState> by hiltMavericksViewModelFactory()
|
||||||
|
|
||||||
init {
|
init {
|
||||||
initialState.pinUserId?.let { userId ->
|
initPin(initialState.pinUserId)
|
||||||
initPin(userId)
|
|
||||||
}
|
|
||||||
initLocationTracking()
|
initLocationTracking()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun initPin(userId: String) {
|
private fun initPin(userId: String?) {
|
||||||
locationPinProvider.create(userId) { pinDrawable ->
|
locationPinProvider.create(userId) { pinDrawable ->
|
||||||
setState { copy(pinDrawable = pinDrawable) }
|
setState { copy(pinDrawable = pinDrawable) }
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
android:width="20dp"
|
||||||
<item>
|
android:height="28dp"
|
||||||
<shape android:shape="oval">
|
android:viewportWidth="20"
|
||||||
<size
|
android:viewportHeight="28">
|
||||||
android:width="13dp"
|
<path
|
||||||
android:height="13dp" />
|
android:pathData="M10,0.667C4.84,0.667 0.667,4.953 0.667,10.254C0.667,15.965 6.56,23.841 8.987,26.84C9.52,27.497 10.493,27.497 11.027,26.84C13.44,23.841 19.333,15.965 19.333,10.254C19.333,4.953 15.16,0.667 10,0.667ZM10,13.678C8.16,13.678 6.667,12.144 6.667,10.254C6.667,8.364 8.16,6.83 10,6.83C11.84,6.83 13.333,8.364 13.333,10.254C13.333,12.144 11.84,13.678 10,13.678Z"
|
||||||
<solid android:color="?colorPrimary" />
|
android:fillColor="#0DBD8B"/>
|
||||||
<stroke
|
</vector>
|
||||||
android:width="2dp"
|
|
||||||
android:color="@color/palette_white" />
|
|
||||||
</shape>
|
|
||||||
</item>
|
|
||||||
</layer-list>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user