use MapPosition.copy(other)
This commit is contained in:
@@ -65,7 +65,7 @@ public class CustomOverlay extends RenderOverlay {
|
||||
newData = true;
|
||||
|
||||
// fix current MapPosition
|
||||
updateMapPosition();
|
||||
mMapPosition.copy(curPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class GridOverlay extends BasicOverlay {
|
||||
public synchronized void update(MapPosition curPos, boolean positionChanged,
|
||||
boolean tilesChanged, Matrices matrices) {
|
||||
|
||||
updateMapPosition();
|
||||
mMapPosition.copy(curPos);
|
||||
|
||||
// fix map position to tile coordinates
|
||||
float size = Tile.TILE_SIZE;
|
||||
|
||||
@@ -117,12 +117,12 @@ public abstract class RenderOverlay {
|
||||
setMatrix(curPos, m, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility: update mMapPosition
|
||||
*
|
||||
* @return true if position has changed
|
||||
*/
|
||||
protected boolean updateMapPosition() {
|
||||
return mMapView.getMapViewPosition().getMapPosition(mMapPosition);
|
||||
}
|
||||
// /**
|
||||
// * Utility: update mMapPosition
|
||||
// *
|
||||
// * @return true if position has changed
|
||||
// */
|
||||
// protected boolean updateMapPosition() {
|
||||
// return mMapView.getMapViewPosition().getMapPosition(mMapPosition);
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -125,11 +125,11 @@ public class TestOverlay extends BasicOverlay {
|
||||
public synchronized void update(MapPosition curPos, boolean positionChanged,
|
||||
boolean tilesChanged, Matrices matrices) {
|
||||
// keep position constant (or update layer relative to new position)
|
||||
//mMapView.getMapViewPosition().getMapPosition(mMapPosition, null);
|
||||
//mMapPosition.copy(curPos);
|
||||
|
||||
if (first) {
|
||||
// fix at initial position
|
||||
updateMapPosition();
|
||||
mMapPosition.copy(curPos);
|
||||
|
||||
first = false;
|
||||
//((SymbolLayer) (layers.textureLayers)).prepare();
|
||||
|
||||
Reference in New Issue
Block a user