如何获取 当前屏幕上的坐标对应的经纬度
来源:互联网 发布:java方法重载和重写 编辑:程序博客网 时间:2024/05/22 10:52
- (void)locateDataFromServer{ if (self.canLoad) { self.canLoad = !self.canLoad; //[self.mapView removeAnnotations:self.mapView.annotations]; //取出当前位置的坐标 CGPoint point = CGPointMake(0, self.view.bounds.size.height-49.0); CGPoint point1 = CGPointMake(self.view.bounds.size.width, 64.0); CLLocationCoordinate2D cll = [self.mapView convertPoint:point toCoordinateFromView:self.view]; CLLocationCoordinate2D cll1 = [self.mapView convertPoint:point1 toCoordinateFromView:self.view]; NSLog(@"%f___%f___%f___%f",cll.longitude,cll.latitude,cll1.longitude,cll1.latitude); NSString *swlng = [NSString stringWithFormat:@"%f",cll.longitude]; NSString *swlat = [NSString stringWithFormat:@"%f",cll.latitude]; NSString *nelng = [NSString stringWithFormat:@"%f",cll1.longitude]; NSString *nelat = [NSString stringWithFormat:@"%f",cll1.latitude]; AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSMutableDictionary *param = [[NSMutableDictionary alloc]init]; [param setObject:@"10" forKey:@"num"]; [param setObject:@"1" forKey:@"page"]; [param setObject:swlng forKey:@"swlng"]; [param setObject:swlat forKey:@"swlat"]; [param setObject:nelng forKey:@"nelng"]; [param setObject:nelat forKey:@"nelat"]; NSString *urlStr = @"你们后台给的关于 地图返回数据的接口"; [manager GET:urlStr parameters:param success:^(AFHTTPRequestOperation *operation, id responseObject) { NSLog(@"%@",responseObject); self.canLoad = !self.canLoad; if ([[responseObject objectForKey:@"code"]isEqualToString:@"101"]) { NSArray *detailArr = [responseObject objectForKey:@"data"]; for (NSMutableDictionary *dic in detailArr) { [self.dataArray addObject:[EGHospitalDetailModel modelWithDictionary:dic]]; } [self addAnnotationsOnTheMap :nil]; } } failure:^(AFHTTPRequestOperation *operation, NSError *error) { self.canLoad = !self.canLoad; }]; }}
1 0
- 如何获取 当前屏幕上的坐标对应的经纬度
- 通过当前坐标 转换成 对应的屏幕坐标
- 获取当前经纬度坐标
- Android 高德地图获取屏幕中心的经纬度坐标
- OpenGL 获取当前屏幕坐标对应的三维坐标,使用很简单glu库中的一个函数
- ccTouchesBegan 中如何让获取的坐标是相对整个屏幕的坐标,而不是在当前view的坐标
- ccTouchesBegan 中如何让获取的坐标是相对整个屏幕的坐标,而不是在当前view的坐标
- 高德地图获取当前屏幕中心点的经纬度
- Unity如何获取鼠标当前帧和上一帧的屏幕坐标差
- 地理坐标、经纬度坐标与屏幕坐标的转换!
- Echart3 如何获取地图的经纬度与页面坐标
- 根据顶点的投影坐标,获取对应的屏幕纹理的纹理坐标
- 如何获取当前屏幕显示的viewcontroller
- IOS百度地图屏幕坐标与经纬度坐标的转换
- 如何获取word可编辑区域在屏幕上的坐标
- 点击图片 , 获取图片上对应的坐标
- android 获取地图中心点的经纬度坐标
- 获取组件在屏幕上的坐标位置
- spoj cot2 树上莫队
- hdu Rikka with Parenthesis II 模拟
- poj 2482 Stars in Your Window (离散化+扫描线)
- 一起去打CS
- 选择器——:nth-last-child(n),
- 如何获取 当前屏幕上的坐标对应的经纬度
- 在Windows下搭建Android开发环境
- 深入理解JavaScript----- 一切都是对象
- XSS学习(一)之HTML
- [2016-8-11]
- STL中vector, Map, Set的实现原理
- codevs 一起去打cs
- sed -n “3p” filename #输出文件的第3行
- 回文串判定