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
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
update Transform geo/screen conversions for tilt #2139
In #2116 we have a PR for tilt/pitch. However we have yet to update Transform::pixelForLatLng & Transform::latLngForPixel to actually use the matrix instead of just doing trig for center, zoom, and rotation, so that pitch can be factored in. As a result, we get things like the floating user dot on iOS and these conversions will be off for e.g. long-press marker drop gestures, too.
Note that we do already account for world wrap and the date line in the current routines.
This is still actionable: fitBounds does not account for the trapezoidal shape of the bounds when the map is tilted. As a result, the map’s camera fails to round-trip correctly (tending to zoom out) when the map starts out tilted.
Just a clarification question here — does the fact that MapKit doesn’t use perspective, but just simple tilt, behave differently in this regard? I wonder if MKMapRect etc. automatically account for tilt.
The perspective-continued branch appears to have been deleted. @ansis, can you re-push your work towards this issue? Or is that now covered by the perspective-improved-gestures branch? Thanks.
Activity
1ec5 commentedon Aug 20, 2015
pixelForLatLng()andlatLngForPixel()need to work withpitch, or things likefitToBounds()will yield unexpected results.incanus commentedon Aug 20, 2015
Right, this is not just cosmetic.
incanus commentedon Aug 20, 2015
Per chat, it's unclear if
-[MGLMapView metersPerPixelAtLatitude:]is affected by this. Need to investigate MapKit.ansis commentedon Aug 24, 2015
These should be implemented in 1551424 and fixed in 1081992.
I'm still working on:
ansis commentedon Aug 26, 2015
Gesture improvements are finished in https://github.com/mapbox/mapbox-gl-native/commits/perspective-continued
incanus commentedon Aug 28, 2015
Is above and/or anything else here still actionable @ansis?
1ec5 commentedon Sep 22, 2015
This is still actionable:
fitBoundsdoes not account for the trapezoidal shape of the bounds when the map is tilted. As a result, the map’s camera fails to round-trip correctly (tending to zoom out) when the map starts out tilted.incanus commentedon Sep 22, 2015
Just a clarification question here — does the fact that MapKit doesn’t use perspective, but just simple tilt, behave differently in this regard? I wonder if MKMapRect etc. automatically account for tilt.
mb12 commentedon Sep 22, 2015
@incanus is it possible to share what's the difference between Mapbox perspective and Map kit tilt and why one picks over the other?
1ec5 commentedon Oct 16, 2015
#2259 covers the
fitBoundswork that needs to take place. Let’s see if we can get @ansis’ work on the perspective-continued branch into master.1ec5 commentedon Oct 20, 2015
The perspective-continued branch appears to have been deleted. @ansis, can you re-push your work towards this issue? Or is that now covered by the perspective-improved-gestures branch? Thanks.
friedbunny commentedon Oct 20, 2015
I have re-pushed
perspective-continuedfrom my local copy, feel free to delete if unnecessary.1ec5 commentedon Oct 21, 2015
I don’t think that was the tip of perspective-continued. Hopefully @ansis has the fixes described in #2139 (comment) around locally still.
stale commentedon Nov 30, 2018
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.