Changeset 4135 in josm for trunk/src/org/openstreetmap
- Timestamp:
- 2011-06-11T01:17:42+02:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r4126 r4135 16 16 import javax.swing.Icon; 17 17 18 import org.openstreetmap.josm.data.coor.CachedLatLon; 18 19 import org.openstreetmap.josm.data.coor.EastNorth; 19 20 import org.openstreetmap.josm.data.coor.LatLon; … … 22 23 import org.openstreetmap.josm.data.gpx.WayPoint; 23 24 import org.openstreetmap.josm.data.preferences.IntegerProperty; 24 import org.openstreetmap.josm.data.projection.Projections;25 25 import org.openstreetmap.josm.gui.MapView; 26 26 import org.openstreetmap.josm.tools.ImageProvider; … … 70 70 may be adjusted later to sync with other data, so not final */ 71 71 72 private LatLon coor;72 private CachedLatLon coor; 73 73 74 74 public final void setCoor(LatLon coor) { 75 this.coor = new LatLon(coor); 75 if(this.coor == null) { 76 this.coor = new CachedLatLon(coor); 77 } else { 78 this.coor.setCoor(coor); 79 } 76 80 } 77 81 … … 81 85 82 86 public final void setEastNorth(EastNorth eastNorth) { 83 this.coor = Projections.inverseProject(eastNorth);87 coor.setEastNorth(eastNorth); 84 88 } 85 89 86 90 public final EastNorth getEastNorth() { 87 return Projections.project(this.coor);91 return coor.getEastNorth(); 88 92 } 89 93
Note:
See TracChangeset
for help on using the changeset viewer.