Mapkit UserLocation找到事件 [英] Mapkit UserLocation found event

查看:67
本文介绍了Mapkit UserLocation找到事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在iPhone mapkit中成功找到用户位置时,是否会触发一个事件?

Is there an event that gets fired when a users location is successfully found in the iPhone mapkit?

我想在当前位置图钉放到地图上时调用Web服务.

I want to call a web service at the time the current location pin is dropped onto the map.

推荐答案

您将需要创建CLLocationManger对象并调用startUpdatingLocation方法.找到并更新位置后,请使用CLLocationMangerDelegate方法

You'll need to create CLLocationManger object and call startUpdatingLocation method. Once the location is found and updated, CLLocationMangerDelegate method

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation

将被自动调用.您可以重新实现此方法,然后从此处调用Web服务.

will be called automatically. You can re-implement this method and call your web service from here.

这篇关于Mapkit UserLocation找到事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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