Open jposes22 opened 6 years ago
Well for me it does work. Do not forget to implement IGMUClusterManagerDelegate on your class.
[Export("clusterManager:didTapClusterItem:")]
public void DidTapClusterItem(GMUClusterManager clusterManager, IGMUClusterItem clusterItem)
{
POIItem poitem = clusterItem as POIItem;
}
I´ve implemented
IGMUClusterManagerDelegate clusterManager.SetDelegate (this, this);
The first function works fine:
[Export ("clusterManager:didTapCluster:")] public void DidTapCluster (GMUClusterManager clusterManager, IGMUCluster cluster)
The problem is only DidTapClusterItem.
I make a native proyect and works all. I was a video if you want: https://drive.google.com/drive/folders/1Kh3Q5iWygYAqHVjXTNUZ6nPKzaLwjt4Q?usp=sharing (you can download video with internet explorer, I don´t know why chrome doesnt work ;( )
I have the same problem :(
I have the same problem
I think the binding is wrong mapped. The return type of this methods should be bool
[Export ("clusterManager:didTapCluster:")]
void DidTapCluster (GMUClusterManager clusterManager, IGMUCluster cluster);
[Export ("clusterManager:didTapClusterItem:")]
void DidTapClusterItem (GMUClusterManager clusterManager, IGMUClusterItem clusterItem);
In the native code from google maps repository:
/**
* Called when the user taps on a cluster marker.
* @return YES if this delegate handled the tap event,
* and NO to pass this tap event to other handlers.
*/
- (BOOL)clusterManager:(GMUClusterManager *)clusterManager didTapCluster (id<GMUCluster>)cluster;
/**
* Called when the user taps on a cluster item marker.
* @return YES if this delegate handled the tap event,
* and NO to pass this tap event to other handlers.
*/
- (BOOL)clusterManager:(GMUClusterManager *)clusterManager didTapClusterItem:(id<GMUClusterItem>)clusterItem;
Soon I'll try to setup a sample project just to demonstrate that it works for me, I am already using it in a production app. And both this functions work for me. I hope you guys are using already published plugin on nuget https://www.nuget.org/packages/Xamarin.iOS.Maps.Utils
Here's a working sample of this plugin, demonstrating DidTapCluster and DidTapClusterItem. https://github.com/Yogeshk25/Google.Maps.Utils.Sample
I try to use this binding with Nuget but doesn´t work. @Yogeshk25 make a branch and works fine but the following Delegate function doesnt´t work too...
Can you help me please :)?