-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Conversation
…ransform and TransformState classes to handle the update of insets as an state update. The insets are taken into account in the map center conversion (LatLng => x,y) if no gesture are taking place.
…mpute center according to insets. Add in NativeMapView header setInsets API.
[ios/android] Add debug view to visualize insets. [core] Add setPitching API to let TransformState be aware of pitching state. TransformState : Apply insets on projection matrix only while pitching gesture occurs. Transform.easeTo : Apply insets only no gesture occurs.
Thank you very much for this work. It’ll help a great deal in coming up with a solution that works on every platform for #2600. One of the challenges as I clean up I’m curious what led to the decision to maintain the insets as a field on A conservative first step would be to just have the platform-specific code (MGLMapView in the case of iOS) keep track of the view insets and pass them into I see you’ve thought about tilting too. What’s the expected interaction for a tilted map? mbgl uses a vertical field of view based on the view’s height. Perhaps the axis of tilt would be shifted downward, but I’m wary of introducing an additional degree of freedom within the scope of this feature. (It would be awesome to have that feature, though!) |
Hi @1ec5, Thanks a lot for your feedback ! Your are right about keeping track of insets in So with insets in I saw you just finished your refactor in #3497. I'll have a look on it and I think I will plug this solution on it. For the tilted map and insets I'll see if I can figure it out but as you said maybe this should be addressed in another PR. |
@lgeromegnace, some good news and bad news. I see you recently pushed https://github.com/Mappy/mapbox-gl-native/tree/2600-insets. The bad news is that we had an internal project that needed insets right away on OS X, so I had to step on your toes a bit and start implementing insets in https://github.com/mapbox/mapbox-gl-native/tree/1ec5-padding-2600. The good news is that you and I chose almost identical approaches at the core level, and since you’re working on the iOS SDK and I’m working on the OS X SDK, conflicts between our branches should be minimal. I’d be happy to handle reconciling the two branches, if you’d like. Apologies for any work duplication here. I really like what you’re doing on the iOS side though. 👍 Are you planning to work on shifting the center during user tracking mode also? (That was the original motivation behind #2600.) |
@1ec5, no need to apologize. On the contrary I'm happy to have you on this field 👍. I like the work you started, About shifting the center during user tracking mode : yes we have to apply inset automatically. So we expect to have the user position centered in the bounds defined by the insets. |
@lgeromegnace |
@tobrun you're right. Thanks for the reminder. |
This pull-request is linked to #3497. This is a WIP so please DO NOT MERGE.