feat: add custom map navigation icon

pull/692/head
andrekir 2023-08-22 22:52:33 -03:00
rodzic 2fa01b4c4c
commit 944a6a5569
3 zmienionych plików z 17 dodań i 2 usunięć

Wyświetl plik

@ -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 {

Wyświetl plik

@ -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>

Wyświetl plik

@ -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>