You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug getCameraForGeometry(Geometry geometry, int[] padding) should return the necessary camera zoom and position to enclose the given geometry on the current camera rotation and tilt.
This works fine for any rotation, but with tilt, this sometimes calculates a zoom much much lower than would be appropriate. The decisive factor for how wrong the calculation turns out to be seems to be the current camera position in relation to the position of the geometry. See the video:
A minimum test with which this should be reproducible is to have a GeoJson layer with one geometry that focuses the camera on tap without changing rotation or tilt. Then, tilt the map and select it like in the video.
Expected behavior
Correct calculation for getCameraForGeometry
westnordost
changed the title
getCameraForGeometry very wrong values when map is tiltedgetCameraForGeometry returns very wrong values when map is tilted
Aug 31, 2024
Describe the bug
getCameraForGeometry(Geometry geometry, int[] padding)
should return the necessary camera zoom and position to enclose the given geometry on the current camera rotation and tilt.This works fine for any rotation, but with tilt, this sometimes calculates a zoom much much lower than would be appropriate. The decisive factor for how wrong the calculation turns out to be seems to be the current camera position in relation to the position of the geometry. See the video:
Tilt.Zoom.Out.mp4
To Reproduce
Reproducable with https://github.com/streetcomplete/StreetComplete/releases/tag/v59.0-alpha2
A minimum test with which this should be reproducible is to have a GeoJson layer with one geometry that focuses the camera on tap without changing rotation or tilt. Then, tilt the map and select it like in the video.
Expected behavior
Correct calculation for
getCameraForGeometry
Platform information:
Additional context
Originally reported in streetcomplete/StreetComplete#5858
This is likely related to #2255, as surely the same algorithm is used to convert a lat-lon-pair to screen coordinates and back.
The text was updated successfully, but these errors were encountered: