Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,12 @@ abstract class BasePhotoMapView : EnhancedImageView, IMapView {
get() {
val viewNoRotation = toViewNoRotation(center ?: PointF(width / 2f, height / 2f))
?: return Coordinate.zero
return toCoordinate(toPixel(viewNoRotation))
val source = toSource(viewNoRotation.x, viewNoRotation.y) ?: return Coordinate.zero
return projection?.toCoordinate(Vector2(source.x, source.y)) ?: Coordinate.zero
}
set(value) {
val pixel = toPixel(value)
requestCenter(toSource(pixel.x, pixel.y))
val source = projection?.toPixels(value.latitude, value.longitude) ?: return
requestCenter(PointF(source.x, source.y))
}
override var mapAzimuth: Float = 0f
set(value) {
Expand Down Expand Up @@ -300,4 +301,4 @@ abstract class BasePhotoMapView : EnhancedImageView, IMapView {
return toView(source.x, source.y, false)
}

}
}