Location layer: lazy rendering start for performance #171
This commit is contained in:
parent
4aaa1ce620
commit
add62c9fe8
@ -43,7 +43,6 @@ public class LocationActivity extends SimpleMapActivity implements LocationListe
|
||||
super.onResume();
|
||||
|
||||
enableAvailableProviders();
|
||||
locationLayer.setEnabled(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -56,6 +55,7 @@ public class LocationActivity extends SimpleMapActivity implements LocationListe
|
||||
|
||||
@Override
|
||||
public void onLocationChanged(Location location) {
|
||||
locationLayer.setEnabled(true);
|
||||
locationLayer.setPosition(location.getLatitude(), location.getLongitude(), location.getAccuracy());
|
||||
|
||||
// Follow location
|
||||
|
@ -27,6 +27,7 @@ public class LocationLayer extends Layer {
|
||||
super(map);
|
||||
|
||||
mRenderer = locationRenderer = new LocationRenderer(mMap, this);
|
||||
setEnabled(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user