Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Add map camera control API #463

Merged
merged 7 commits into from
Apr 5, 2018

Conversation

mravn-google
Copy link
Contributor

@mravn-google mravn-google commented Apr 4, 2018

  • Add Dart API to move and animate map camera.
  • Add Android implementation.
  • Restructure plugin to use Dart library and parts.

@mravn-google mravn-google changed the title Camera move API Add map camera control API Apr 4, 2018
@mravn-google mravn-google self-assigned this Apr 4, 2018
Copy link
Contributor

@sigurdm sigurdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

googleMap.animateCamera(cameraUpdate);
void moveCamera(final CameraUpdate cameraUpdate) {
if (googleMap == null) {
pendingOperations.add(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to save the pre-initialized operations on the dart side to avoid duplicating this logic for ios.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

)
],
body: new NotificationListener<ScrollNotification>(
onNotification: (ScrollNotification sn) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit:
Don't abbreviate. sn => scrollNotification

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

);
}

static CameraUpdate newLatLong(LatLng latLng) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newLatLong => newLatLng ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

///
/// Used for programmatically controlling a platform-specific
/// GoogleMaps view, once it has been created and integrated
/// into the Flutter application.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"once it has been created and integrated into the Flutter application." => "once it has been initialized."?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


part of google_mobile_maps;

class Marker {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add TODO

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class removed.

Copy link
Contributor Author

@mravn-google mravn-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

googleMap.animateCamera(cameraUpdate);
void moveCamera(final CameraUpdate cameraUpdate) {
if (googleMap == null) {
pendingOperations.add(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

);
}

static CameraUpdate newLatLong(LatLng latLng) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

)
],
body: new NotificationListener<ScrollNotification>(
onNotification: (ScrollNotification sn) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


part of google_mobile_maps;

class Marker {}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Class removed.

///
/// Used for programmatically controlling a platform-specific
/// GoogleMaps view, once it has been created and integrated
/// into the Flutter application.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@mravn-google mravn-google merged commit eff09fe into flutter:master Apr 5, 2018
@mravn-google mravn-google deleted the expand_ctrl_api branch April 5, 2018 19:55
slightfoot pushed a commit to slightfoot/plugins that referenced this pull request Jun 5, 2018
amirh pushed a commit to amirh/plugins that referenced this pull request Nov 28, 2018
This was done in flutter#463, not sure why, but I don't think we should export
it (and it makes Dartdoc complain).
amirh added a commit that referenced this pull request Nov 28, 2018
This was done in #463, not sure why, but I don't think we should export
it (and it makes Dartdoc complain).
andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
This was done in flutter#463, not sure why, but I don't think we should export
it (and it makes Dartdoc complain).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants