Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proyect doesn´t work #7

Open
jposes22 opened this issue Feb 16, 2018 · 7 comments
Open

Proyect doesn´t work #7

jposes22 opened this issue Feb 16, 2018 · 7 comments

Comments

@jposes22
Copy link

jposes22 commented Feb 16, 2018

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

public void DidTapClusterItem(GMUClusterManager clusterManager, IGMUClusterItem clusterItem) {}

Can you help me please :)?

captura de pantalla 2018-02-16 a las 14 05 48

@yogeshk25
Copy link

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;
}

@jposes22
Copy link
Author

jposes22 commented Feb 16, 2018

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 ;( )

@simon25608
Copy link

I have the same problem :(

@ghost
Copy link

ghost commented Feb 21, 2018

I have the same problem

@ghost
Copy link

ghost commented Feb 21, 2018

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;

@yogeshk25
Copy link

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

@yogeshk25
Copy link

Here's a working sample of this plugin, demonstrating DidTapCluster and DidTapClusterItem.
https://github.com/Yogeshk25/Google.Maps.Utils.Sample

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants