Closed tommag21 closed 4 years ago
At the moment this is not possible. To pass information (like icons) from the google-maps plugin to the google-maps-utils plugin I use the infoWindowTemplate. I'm trying to think of a better idea to release this feature.
And thank you for the thank you message, this is my first plugin, it makes me happy
I made a little change to the CustomClusterRenderer onBeforeClusterItemRendered function, only on Android yet. Now it shows the default marker info window (marker.title
, marker.snippet
). The icon is taken the same way from the marker.icon
property.
onBeforeClusterItemRendered: function (item, markerOptions) {
this.super.onBeforeClusterItemRendered(item, markerOptions);
var mIcon = Image;
mIcon.imageSource = item.marker.icon.imageSource;
var androidIcon = com.google.android.gms.maps.model.BitmapDescriptorFactory.fromBitmap(mIcon.imageSource.android);
markerOptions.icon(androidIcon);
}
If I remember correctly, I had a problem with the marker.icon because if we had several icon types, it always gave the same.
After testing your piece of code, it works correctly.
If that suits you, I would add your code instead of mine and I would work on the title and infowindow (ios & android)
Of course, you might want to do additional tests anyway. I've only tested on Android emulator
I have tested on android and all works well. I have to look for iOS and I will update the plugin with the new pod & gradle
Are custom info windows supported yet? Or any kind of
infoWindow
By the way thanks for the plugin!