如何保存GPS采集数据到离线Geodatabase

用gps打点采集到的轨迹,写入geodatabase,wifi环境下同步服务器,感觉用
AGSPopusContainerViewController不符合我们的需求,所以打算自定义,现在还没有什么好的想法
已邀请:

马克玲

赞同来自:

【解决办法】:
1、采纳CLLocationManagerDelegate 协议

2、在委托方法- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation中捕获位置更新事件;

3、通过[self.mapView.locationDisplay mapLocation] 获取当前位置点;

4、通过AGSGDBFeatureTable 的-(Bool)saveFeature:(id) feature
error: (NSError **) error

方法,将位置点保存到本地GDB的表中

为了保证后续geodatabase中的数据能同步回feature service,本地离线geodatabase必须从feature service下载,这样才支持同步。

要回复问题请先登录注册