use MapPosition.copy(other)

This commit is contained in:
Hannes Janetzek
2013-03-26 06:40:49 +01:00
parent 72741ced7f
commit a818e2f062
6 changed files with 23 additions and 14 deletions

View File

@@ -15,7 +15,6 @@
*/
package org.oscim.core;
/** A MapPosition Container. */
public class MapPosition {
@@ -70,6 +69,16 @@ public class MapPosition {
this.y = MercatorProjection.latitudeToPixelY(latitude, zoomLevel);
}
public void copy(MapPosition other) {
this.zoomLevel = other.zoomLevel;
this.scale = other.scale;
this.lat = other.lat;
this.lon = other.lon;
this.angle = other.angle;
this.x = other.x;
this.y = other.y;
}
@Override
public String toString() {
StringBuilder builder = new StringBuilder();