Added 2 additional marker colors (except map images)
This commit is contained in:
parent
21ea0c4c4b
commit
faa85cdf54
4 changed files with 30 additions and 6 deletions
|
@ -5,7 +5,9 @@
|
|||
<color name="marker_green">#73b825</color>
|
||||
<color name="marker_orange">#ff9800</color>
|
||||
<color name="marker_red">#e53935</color>
|
||||
<color name="marker_lt_green">#d7eb23</color>
|
||||
<color name="marker_yellow">#FDD835</color>
|
||||
<color name="marker_teal">#26a69a</color>
|
||||
<color name="marker_purple">#ab47bc</color>
|
||||
|
||||
<color name="popup_bg_color">#EE666666</color>
|
||||
<color name="popup_separator_color">#BBBBBB</color>
|
||||
|
|
|
@ -11,7 +11,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class MapMarkersHelper {
|
||||
public static final int MAP_MARKERS_COLORS_COUNT = 5;
|
||||
public static final int MAP_MARKERS_COLORS_COUNT = 7;
|
||||
|
||||
private List<MapMarker> mapMarkers = new ArrayList<>();
|
||||
private List<MapMarker> mapMarkersHistory = new ArrayList<>();
|
||||
|
|
|
@ -507,7 +507,13 @@ public class MapMarkerDialogHelper {
|
|||
colorId = R.color.marker_red;
|
||||
break;
|
||||
case 4:
|
||||
colorId = R.color.marker_lt_green;
|
||||
colorId = R.color.marker_yellow;
|
||||
break;
|
||||
case 5:
|
||||
colorId = R.color.marker_teal;
|
||||
break;
|
||||
case 6:
|
||||
colorId = R.color.marker_purple;
|
||||
break;
|
||||
default:
|
||||
colorId = R.color.marker_blue;
|
||||
|
|
|
@ -32,12 +32,16 @@ public class MapMarkersLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
private Bitmap markerBitmapOrange;
|
||||
private Bitmap markerBitmapRed;
|
||||
private Bitmap markerBitmapYellow;
|
||||
private Bitmap markerBitmapTeal;
|
||||
private Bitmap markerBitmapPurple;
|
||||
|
||||
private Paint bitmapPaintDestBlue;
|
||||
private Paint bitmapPaintDestGreen;
|
||||
private Paint bitmapPaintDestOrange;
|
||||
private Paint bitmapPaintDestRed;
|
||||
private Paint bitmapPaintDestLtGreen;
|
||||
private Paint bitmapPaintDestYellow;
|
||||
private Paint bitmapPaintDestTeal;
|
||||
private Paint bitmapPaintDestPurple;
|
||||
private Bitmap arrowToDestination;
|
||||
private float[] calculations = new float[2];
|
||||
|
||||
|
@ -55,13 +59,17 @@ public class MapMarkersLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
markerBitmapOrange = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_marker_orange);
|
||||
markerBitmapRed = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_marker_red);
|
||||
markerBitmapYellow = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_marker_yellow);
|
||||
markerBitmapTeal = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_marker_red);
|
||||
markerBitmapPurple = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_marker_green);
|
||||
|
||||
arrowToDestination = BitmapFactory.decodeResource(view.getResources(), R.drawable.map_arrow_to_destination);
|
||||
bitmapPaintDestBlue = createPaintDest(R.color.marker_blue);
|
||||
bitmapPaintDestGreen = createPaintDest(R.color.marker_green);
|
||||
bitmapPaintDestOrange = createPaintDest(R.color.marker_orange);
|
||||
bitmapPaintDestRed = createPaintDest(R.color.marker_red);
|
||||
bitmapPaintDestLtGreen = createPaintDest(R.color.marker_lt_green);
|
||||
bitmapPaintDestYellow = createPaintDest(R.color.marker_yellow);
|
||||
bitmapPaintDestTeal = createPaintDest(R.color.marker_teal);
|
||||
bitmapPaintDestPurple = createPaintDest(R.color.marker_purple);
|
||||
}
|
||||
|
||||
private Paint createPaintDest(int colorId) {
|
||||
|
@ -85,7 +93,11 @@ public class MapMarkersLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
case 3:
|
||||
return bitmapPaintDestRed;
|
||||
case 4:
|
||||
return bitmapPaintDestLtGreen;
|
||||
return bitmapPaintDestYellow;
|
||||
case 5:
|
||||
return bitmapPaintDestTeal;
|
||||
case 6:
|
||||
return bitmapPaintDestPurple;
|
||||
default:
|
||||
return bitmapPaintDestBlue;
|
||||
}
|
||||
|
@ -103,6 +115,10 @@ public class MapMarkersLayer extends OsmandMapLayer implements ContextMenuLayer.
|
|||
return markerBitmapRed;
|
||||
case 4:
|
||||
return markerBitmapYellow;
|
||||
case 5:
|
||||
return markerBitmapTeal;
|
||||
case 6:
|
||||
return markerBitmapPurple;
|
||||
default:
|
||||
return markerBitmapBlue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue