-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for changing the receiver’s viewport to fit given bounds #133
Conversation
@TimAlber It would be great if you could also add a simple example to the example app. That makes it easier to test this and it also showcases the feature. |
Thank you for the example. Do you also want to add a web implementation? If not, I'll create an issue and someone can add it later on. |
I think it makes most sense if you create an issue and someone can add it later on. |
example/lib/given_bounds.dart
Outdated
padding: 25, | ||
); | ||
}, | ||
child: const Text('Set Bounds to Germanny'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
child: const Text('Set Bounds to Germanny'), | |
child: const Text('Set bounds to Germany'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one nit ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I also left this tiny review in "pending" mode 🤦♂️
example/lib/given_bounds.dart
Outdated
padding: 25, | ||
); | ||
}, | ||
child: const Text('Set Bounds to Afrika'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
child: const Text('Set Bounds to Afrika'), | |
child: const Text('Set bounds to Africa'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ready to merge this (apart from the very small suggestions), once this PR is up to date with the main branch ;)
example/lib/given_bounds.dart
Outdated
|
||
class GivenBoundsPage extends ExamplePage { | ||
GivenBoundsPage() | ||
: super(const Icon(Icons.map_sharp), 'Changing given Bounds'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
: super(const Icon(Icons.map_sharp), 'Changing given Bounds'); | |
: super(const Icon(Icons.map_sharp), 'Changing given bounds'); |
I fixed those typos. |
I don't know why iOS doesn't build. Maybe try to restart it? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you again for contributing this feature!
@TimAlber Your contributions would also be interesting for the flutter-mapbox-gl repo where this plugin was forked from. Would you like to "upstream" your changes? If not, someone else could also do it. |
@m0nac0 I think it would be best if someone else could do that. |
Add a feature to fit the viewport to given coordinate bounds.