Skip to content

Commit e7e32fb

Browse files
committed
Add traffic layer
1 parent 7cdf263 commit e7e32fb

File tree

5 files changed

+25
-5
lines changed

5 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,19 @@ All notable changes to this project will be documented in this file.
33
Adheres to [Semantic Versioning](http://semver.org/).
44

55
---
6-
## 6.2.7 (TBD)
6+
## 6.287 (TBD)
77

88
##### Features
99

1010
##### Bug Fixes
1111

12+
## [6.2.7](https://github.com/ngageoint/mage-android/releases/tag/6.2.7)
13+
14+
##### Features
15+
* Traffic map layer
16+
17+
##### Bug Fixes
18+
1219
## [6.2.6](https://github.com/ngageoint/mage-android/releases/tag/6.2.6)
1320

1421
##### Features

mage/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ apply plugin: 'kotlin-kapt'
1111
apply plugin: 'maven-publish'
1212
group 'mil.nga.giat.mage'
1313
archivesBaseName = 'mage-android'
14-
version '6.2.6'
14+
version '6.2.7'
1515
ext {
16-
versionCode = 69
16+
versionCode = 70
1717
sourceRefspec = Grgit.open().head().id
1818
}
1919

mage/src/main/java/mil/nga/giat/mage/map/MapFragment.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,9 @@ public void onMapReady(GoogleMap googleMap) {
416416
googleMap.setMapStyle(MapStyleOptions.loadRawResourceStyle(getContext(), R.raw.map_theme_night));
417417
}
418418

419+
boolean showTraffic = preferences.getBoolean(getResources().getString(R.string.showTrafficKey), getResources().getBoolean(R.bool.showTrafficDefaultValue));
420+
map.setTrafficEnabled(showTraffic);
421+
419422
Event currentEvent = EventHelper.getInstance(getActivity()).getCurrentEvent();
420423
long currentEventId = this.currentEventId;
421424
if (currentEvent != null) {

mage/src/main/res/values/pairs.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
<string name="baseLayerKey">baseLayer</string>
1010
<integer name="baseLayerDefaultValue">1</integer>
1111

12+
<string name="showTrafficKey">showTraffic</string>
13+
<bool name="showTrafficDefaultValue">false</bool>
14+
1215
<string name="showMGRSKey">showMGRS</string>
1316
<bool name="showMGRSDefaultValue">false</bool>
1417

mage/src/main/res/xml/mappreferences.xml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,18 @@
1111
android:title="Base Layer"
1212
android:summary="%s"/>
1313

14+
<android.support.v7.preference.SwitchPreferenceCompat
15+
android:defaultValue="@bool/showTrafficDefaultValue"
16+
android:key="@string/showTrafficKey"
17+
android:summary="Google Maps Traffic"
18+
android:title="Traffic">
19+
</android.support.v7.preference.SwitchPreferenceCompat>
20+
1421
<android.support.v7.preference.SwitchPreferenceCompat
1522
android:defaultValue="@bool/showMGRSDefaultValue"
1623
android:key="@string/showMGRSKey"
17-
android:summary="Show Military Grid Reference System overlay"
18-
android:title="Show MGRS">
24+
android:summary="Military Grid Reference System overlay"
25+
android:title="MGRS">
1926
</android.support.v7.preference.SwitchPreferenceCompat>
2027

2128
<mil.nga.giat.mage.map.preference.OverlayPreference

0 commit comments

Comments
 (0)