Skip to content

Commit

Permalink
Fix bug with static feature loading
Browse files Browse the repository at this point in the history
  • Loading branch information
newmanw committed Oct 12, 2017
1 parent c3f41a6 commit 4956932
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Adheres to [Semantic Versioning](http://semver.org/).

##### Bug Fixes
* Fix static feature map click
* Fix static feature preference loading

## [5.3.4](https://github.com/ngageoint/mage-android/releases/tag/5.3.4) (10-05-2017)

Expand Down
2 changes: 1 addition & 1 deletion mage/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group 'mil.nga.giat.mage'
archivesBaseName = 'mage-android'
version '5.3.5'
ext {
versionCode = 40
versionCode = 41
sourceRefspec = Grgit.open().head().id
}

Expand Down
19 changes: 5 additions & 14 deletions mage/src/main/java/mil/nga/giat/mage/map/MapFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,11 @@ public void onClick(View v) {

ObservationHelper.getInstance(getActivity().getApplicationContext()).addListener(this);
LocationHelper.getInstance(getActivity().getApplicationContext()).addListener(this);

updateStaticFeatureLayers();

CacheProvider.getInstance(getActivity().getApplicationContext()).registerCacheOverlayListener(this);
StaticFeatureHelper.getInstance(getActivity().getApplicationContext()).addListener(this);
}

if (observations != null) {
Expand Down Expand Up @@ -380,11 +385,6 @@ public void onClick(View v) {
refreshMyHistoricLocationsMarkersTask.executeOnExecutor(executor, REFRESHMARKERINTERVALINSECONDS);
}

updateStaticFeatureLayers();

CacheProvider.getInstance(getActivity().getApplicationContext()).registerCacheOverlayListener(this);
StaticFeatureHelper.getInstance(getActivity().getApplicationContext()).addListener(this);

// Check if any map preferences changed that I care about
if (locationService != null && ContextCompat.checkSelfPermission(getActivity().getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {
map.setMyLocationEnabled(true);
Expand All @@ -402,15 +402,6 @@ public void onLowMemory() {
mapView.onLowMemory();
}

@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);

// Bundle mapState = new Bundle();
// mapView.onSaveInstanceState(mapState);
// outState.putBundle(MAP_VIEW_STATE, mapState);
}

@Override
public void onResume() {
super.onResume();
Expand Down

0 comments on commit 4956932

Please sign in to comment.