Skip to content

Conversation

@n8han
Copy link
Collaborator

@n8han n8han commented Feb 3, 2020

This allows the maps center (corresponding to a user location, or any
given coordinate) to be automatically offset to account for content that
is inset within the map.

https://docs.mapbox.com/ios/api/maps/5.6.1/Classes/MGLMapView.html#/c:objc(cs)MGLMapView(im)setContentInset:animated:completionHandler:

This allows the maps center (corresponding to a user location, or any
given coordinate) to be automatically offset to account for content that
is inset within the map.

https://docs.mapbox.com/ios/api/maps/5.6.1/Classes/MGLMapView.html#/c:objc(cs)MGLMapView(im)setContentInset:animated:completionHandler:
@tobrun
Copy link
Collaborator

tobrun commented Feb 15, 2020

Awesome contribution @n8han! We will need the android equivalent of mapboxMap#setPadding for parity.

@tobrun tobrun added this to the v0.1.0 milestone Feb 15, 2020
@tobrun tobrun merged commit 16439ed into flutter-mapbox-gl:master Feb 15, 2020
@tobrun tobrun mentioned this pull request Feb 15, 2020
Lobankovanastia pushed a commit to Lobankovanastia/flutter-mapbox-gl that referenced this pull request Feb 15, 2020
This allows the maps center (corresponding to a user location, or any
given coordinate) to be automatically offset to account for content that
is inset within the map.

https://docs.mapbox.com/ios/api/maps/5.6.1/Classes/MGLMapView.html#/c:objc(cs)MGLMapView(im)setContentInset:animated:completionHandler:
@n8han n8han deleted the UpdateContentInsets branch February 17, 2020 17:48
andrea689 added a commit to andrea689/flutter-mapbox-gl that referenced this pull request Mar 13, 2020
* master:
  Support setting map's content insets (flutter-mapbox-gl#215)
  Provide `onMapIdle` callback (flutter-mapbox-gl#214)
  [example] add full page map example (flutter-mapbox-gl#201)
  Fix missing location indicator on iOS (flutter-mapbox-gl#176)
  Returned a nil result so the future completes. (flutter-mapbox-gl#216)
  Update README: Access Tokens for self-hosted tiles (flutter-mapbox-gl#217)
  Change annotation priority (flutter-mapbox-gl#222)
n8han added a commit that referenced this pull request Oct 30, 2021
This is the android implementation of PR #215. On Android the content
insets are modeled as camera padding.

Includes a few whitespace fixes.
n8han added a commit that referenced this pull request Nov 8, 2021
This is the android implementation of PR #215. On Android the content
insets are modeled as camera padding.

Includes a few whitespace fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants