Update
This commit is contained in:
parent
260ef1da80
commit
3ffc9b7ea6
1 changed files with 4 additions and 4 deletions
|
@ -159,8 +159,7 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
||||||
activity.getContextMenu().hide();
|
activity.getContextMenu().hide();
|
||||||
LatLon ll = menu.getLatLon();
|
LatLon ll = menu.getLatLon();
|
||||||
RotatedTileBox rb = new RotatedTileBox(tileBox);
|
RotatedTileBox rb = new RotatedTileBox(tileBox);
|
||||||
PointF pf = getMoveableCenterPoint(rb);
|
rb.setCenterLocation(0.5f, 0.5f);
|
||||||
rb.setCenterLocation(pf.x, pf.y);
|
|
||||||
rb.setLatLonCenter(ll.getLatitude(), ll.getLongitude());
|
rb.setLatLonCenter(ll.getLatitude(), ll.getLongitude());
|
||||||
double lat = rb.getLatFromPixel(tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
double lat = rb.getLatFromPixel(tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
||||||
double lon = rb.getLonFromPixel(tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
double lon = rb.getLonFromPixel(tileBox.getCenterPixelX(), tileBox.getCenterPixelY());
|
||||||
|
@ -215,8 +214,9 @@ public class ContextMenuLayer extends OsmandMapLayer {
|
||||||
mInChangeMarkerPositionMode = false;
|
mInChangeMarkerPositionMode = false;
|
||||||
|
|
||||||
RotatedTileBox tileBox = activity.getMapView().getCurrentRotatedTileBox();
|
RotatedTileBox tileBox = activity.getMapView().getCurrentRotatedTileBox();
|
||||||
PointF newMarkerPosition = new PointF(tileBox.getPixWidth() / 2,
|
PointF newMarkerPosition = getMoveableCenterPoint(tileBox);
|
||||||
tileBox.getPixHeight() / 2);
|
LatLon ll = tileBox.getLatLonFromPixel(newMarkerPosition.x, newMarkerPosition.y);
|
||||||
|
applyMovedObject(getMoveableObject(), ll);
|
||||||
// TODO pass object properly
|
// TODO pass object properly
|
||||||
showContextMenu(newMarkerPosition, tileBox, true);
|
showContextMenu(newMarkerPosition, tileBox, true);
|
||||||
view.refreshMap();
|
view.refreshMap();
|
||||||
|
|
Loading…
Reference in a new issue