-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Add Infowindow tapped handler; also rev. google play services to 15.+… #594
Conversation
… to fix runtime issue with different versions
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.
LGTM
@@ -0,0 +1,7 @@ | |||
package io.flutter.plugins.googlemaps; |
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.
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 = |
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.
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); |
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.
Please use camel case here too: infoWindow#onTap
.
…ader to OnInfoWindowTappedListener.java
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. |
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? |
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:
Note that this feature was mention in this issue: #17730
The google play issue was mentioned in this issue: #17926