如何处理针对ios的Xamarin谷歌地图组件的点击事件 [英] how to handle click event in Xamarin google map component for ios

查看:143
本文介绍了如何处理针对ios的Xamarin谷歌地图组件的点击事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用xamarin googel地图组件在iOS中开发Google地图应用程序。当用户触摸地图时,我想要获取用户触摸的地图的位置。任何想法。

I am using xamarin googel map component to develop google map application in iOS. When user touches the map I want to get the location of the map that user touches. any idea.

提前感谢

推荐答案

MapView有一个点击事件,以及多个Touches *事件

MapView has a tapped event, as well as multiple Touches* events

mapView.Tapped += delegate(object sender, GMSCoordEventArgs e) {
  Console.WriteLine("tapped at " + e.Coordinate.Latitude + "," + e.Coordinate.Longitude);
};

这篇关于如何处理针对ios的Xamarin谷歌地图组件的点击事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆