Skip to content

Commit

Permalink
Location layer: lazy rendering start for performance opensciencemap#171
Browse files Browse the repository at this point in the history
  • Loading branch information
devemux86 committed Nov 16, 2016
1 parent 4aaa1ce commit add62c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ protected void onResume() {
super.onResume();

enableAvailableProviders();
locationLayer.setEnabled(true);
}

@Override
Expand All @@ -56,6 +55,7 @@ protected void onPause() {

@Override
public void onLocationChanged(Location location) {
locationLayer.setEnabled(true);
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getAccuracy());

// Follow location
Expand Down
1 change: 1 addition & 0 deletions vtm/src/org/oscim/layers/LocationLayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public LocationLayer(Map map) {
super(map);

mRenderer = locationRenderer = new LocationRenderer(mMap, this);
setEnabled(false);
}

@Override
Expand Down

0 comments on commit add62c9

Please sign in to comment.