kopia lustrzana https://github.com/meshtastic/Meshtastic-Android
feat: add custom map navigation icon
rodzic
2fa01b4c4c
commit
944a6a5569
|
@ -157,10 +157,14 @@ fun MapView(model: UIViewModel = viewModel()) {
|
||||||
myLocationOverlay = MyLocationNewOverlay(this).apply {
|
myLocationOverlay = MyLocationNewOverlay(this).apply {
|
||||||
enableMyLocation()
|
enableMyLocation()
|
||||||
enableFollowLocation()
|
enableFollowLocation()
|
||||||
AppCompatResources.getDrawable(context, R.drawable.ic_location_dot_24)?.let {
|
AppCompatResources.getDrawable(context, R.drawable.ic_map_location_dot_24)?.let {
|
||||||
setPersonIcon(it.toBitmap())
|
setPersonIcon(it.toBitmap())
|
||||||
setPersonAnchor(0.5f, 0.5f)
|
setPersonAnchor(0.5f, 0.5f)
|
||||||
}
|
}
|
||||||
|
AppCompatResources.getDrawable(context, R.drawable.ic_map_navigation_24)?.let {
|
||||||
|
setDirectionIcon(it.toBitmap())
|
||||||
|
setDirectionAnchor(0.5f, 0.5f)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
overlays.add(myLocationOverlay)
|
overlays.add(myLocationOverlay)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
<path
|
<path
|
||||||
android:fillColor="#3388ff"
|
android:fillColor="#3388ff"
|
||||||
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"
|
android:pathData="M12,12m-8,0a8,8 0,1 1,16 0a8,8 0,1 1,-16 0"
|
||||||
android:strokeWidth="2.5"
|
android:strokeWidth="2.0"
|
||||||
android:strokeColor="@android:color/white" />
|
android:strokeColor="@android:color/white" />
|
||||||
</vector>
|
</vector>
|
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="36dp"
|
||||||
|
android:height="36dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:fillColor="#3388ff"
|
||||||
|
android:pathData="M12,2L4.5,20.29l0.71,0.71L12,18l6.79,3 0.71,-0.71z"
|
||||||
|
android:strokeWidth="1.5"
|
||||||
|
android:strokeColor="@android:color/white" />
|
||||||
|
</vector>
|
Ładowanie…
Reference in New Issue