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

Add Infowindow tapped handler; also rev. google play services to 15.+… #594

Merged
merged 3 commits into from
Jun 7, 2018

Conversation

gerryhigh
Copy link
Contributor

This pull request adds in a callback for clicking on the map info window. It also updates the google play services to 15.+ to avoid runtime issues with other plugins using a later version of google play.

To use the callback just do something like this in your flutter code:

controller.onInfoWindowTapped.add((Marker marker) {
});

Note that this feature was mention in this issue: #17730

The google play issue was mentioned in this issue: #17926

… to fix runtime issue with different versions
Copy link
Contributor

@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.

LGTM

@@ -0,0 +1,7 @@
package io.flutter.plugins.googlemaps;
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to add the license header here.

@@ -37,6 +37,8 @@ class GoogleMapController extends ChangeNotifier {
/// Callbacks to receive tap events for markers placed on this map.
final ArgumentCallbacks<Marker> onMarkerTapped =
new ArgumentCallbacks<Marker>();
final ArgumentCallbacks<Marker> onInfoWindowTapped =
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add dart doc to this property.

final Map<String, Object> arguments = new HashMap<>(2);
arguments.put("map", controller.id());
arguments.put("marker", marker.getId());
channel.invokeMethod("infowindow#onTap", arguments);
Copy link
Contributor

Choose a reason for hiding this comment

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

Please use camel case here too: infoWindow#onTap.

@mravn-google mravn-google self-assigned this Jun 6, 2018
@mravn-google mravn-google merged commit 93a63cd into flutter:master Jun 7, 2018
@lroige
Copy link

lroige commented Jul 5, 2018

Hi, I've been trying your plug-in in my application and the names in the map are in a weird combination of languages. Is there a way to set the map language? I've been investigating and it seems it's possible to do it if you use javascript, but I didn't find anything related with apps. Also, is there a way to overlay a bottomAppBar in the map route? I've been trying but can't seem to find the way to do it. I'm pretty new to flutter, so maybe I just don't know where to look.

@lroige
Copy link

lroige commented Jul 9, 2018

It seems the language issue I mentioned before was a problem with my testing device's settings. I'm still looking for a way to show a bottomAppBar in the map route, do you know if there's a way to do it?

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.

4 participants