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 {
|
||||
enableMyLocation()
|
||||
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())
|
||||
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)
|
||||
} else {
|
||||
|
|
|
@ -6,6 +6,6 @@
|
|||
<path
|
||||
android:fillColor="#3388ff"
|
||||
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" />
|
||||
</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