Commit aa6d427a authored by lujunye's avatar lujunye

地图选择部分完成

parent 6055b94b
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
E030DF372485DD3E002764D3 /* NewRKCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E030DF352485DD3E002764D3 /* NewRKCell.xib */; }; E030DF372485DD3E002764D3 /* NewRKCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E030DF352485DD3E002764D3 /* NewRKCell.xib */; };
E030DF3B248651A5002764D3 /* NewRKVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E030DF39248651A5002764D3 /* NewRKVc.swift */; }; E030DF3B248651A5002764D3 /* NewRKVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E030DF39248651A5002764D3 /* NewRKVc.swift */; };
E030DF3C248651A5002764D3 /* NewRKVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = E030DF3A248651A5002764D3 /* NewRKVc.xib */; }; E030DF3C248651A5002764D3 /* NewRKVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = E030DF3A248651A5002764D3 /* NewRKVc.xib */; };
E031ED4A24DBF8400042B47B /* BLCoordinatesChangeHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = E031ED4924DBF8400042B47B /* BLCoordinatesChangeHelper.m */; };
E0329EA424D808B1000D547E /* PayPassView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0329EA324D808B1000D547E /* PayPassView.swift */; }; E0329EA424D808B1000D547E /* PayPassView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0329EA324D808B1000D547E /* PayPassView.swift */; };
E0336DD5244EC40000380BE9 /* CreatNewSpecsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0336DD3244EC40000380BE9 /* CreatNewSpecsViewController.swift */; }; E0336DD5244EC40000380BE9 /* CreatNewSpecsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0336DD3244EC40000380BE9 /* CreatNewSpecsViewController.swift */; };
E0336DD6244EC40000380BE9 /* CreatNewSpecsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0336DD4244EC40000380BE9 /* CreatNewSpecsViewController.xib */; }; E0336DD6244EC40000380BE9 /* CreatNewSpecsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0336DD4244EC40000380BE9 /* CreatNewSpecsViewController.xib */; };
...@@ -709,6 +710,8 @@ ...@@ -709,6 +710,8 @@
E030DF352485DD3E002764D3 /* NewRKCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewRKCell.xib; sourceTree = "<group>"; }; E030DF352485DD3E002764D3 /* NewRKCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewRKCell.xib; sourceTree = "<group>"; };
E030DF39248651A5002764D3 /* NewRKVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewRKVc.swift; sourceTree = "<group>"; }; E030DF39248651A5002764D3 /* NewRKVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewRKVc.swift; sourceTree = "<group>"; };
E030DF3A248651A5002764D3 /* NewRKVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewRKVc.xib; sourceTree = "<group>"; }; E030DF3A248651A5002764D3 /* NewRKVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = NewRKVc.xib; sourceTree = "<group>"; };
E031ED4824DBF8400042B47B /* BLCoordinatesChangeHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BLCoordinatesChangeHelper.h; sourceTree = "<group>"; };
E031ED4924DBF8400042B47B /* BLCoordinatesChangeHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BLCoordinatesChangeHelper.m; sourceTree = "<group>"; };
E0329EA324D808B1000D547E /* PayPassView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayPassView.swift; sourceTree = "<group>"; }; E0329EA324D808B1000D547E /* PayPassView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PayPassView.swift; sourceTree = "<group>"; };
E0336DD3244EC40000380BE9 /* CreatNewSpecsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatNewSpecsViewController.swift; sourceTree = "<group>"; }; E0336DD3244EC40000380BE9 /* CreatNewSpecsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreatNewSpecsViewController.swift; sourceTree = "<group>"; };
E0336DD4244EC40000380BE9 /* CreatNewSpecsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CreatNewSpecsViewController.xib; sourceTree = "<group>"; }; E0336DD4244EC40000380BE9 /* CreatNewSpecsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CreatNewSpecsViewController.xib; sourceTree = "<group>"; };
...@@ -1799,6 +1802,8 @@ ...@@ -1799,6 +1802,8 @@
E088CC882446FFA1000DAA8A /* Other */ = { E088CC882446FFA1000DAA8A /* Other */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
E031ED4824DBF8400042B47B /* BLCoordinatesChangeHelper.h */,
E031ED4924DBF8400042B47B /* BLCoordinatesChangeHelper.m */,
E09B3AB624B2FCAF00E3B238 /* SDK */, E09B3AB624B2FCAF00E3B238 /* SDK */,
F93E31FE2473C9C200524DFC /* JPush */, F93E31FE2473C9C200524DFC /* JPush */,
F956D560246A2D9C003FF510 /* LMNote */, F956D560246A2D9C003FF510 /* LMNote */,
...@@ -3515,6 +3520,7 @@ ...@@ -3515,6 +3520,7 @@
E0337EED2464EED000952EF4 /* PinPaiListViewController.swift in Sources */, E0337EED2464EED000952EF4 /* PinPaiListViewController.swift in Sources */,
E0BE8A9C245A9E5900E80134 /* YingFuZhangKuanXQCell.swift in Sources */, E0BE8A9C245A9E5900E80134 /* YingFuZhangKuanXQCell.swift in Sources */,
F956D59D246A2D9C003FF510 /* LMNTextStorage.m in Sources */, F956D59D246A2D9C003FF510 /* LMNTextStorage.m in Sources */,
E031ED4A24DBF8400042B47B /* BLCoordinatesChangeHelper.m in Sources */,
E02C882A2456B4BA00925766 /* WLGZCell.swift in Sources */, E02C882A2456B4BA00925766 /* WLGZCell.swift in Sources */,
F950FDE824518CD800C40530 /* TimeSelectView.swift in Sources */, F950FDE824518CD800C40530 /* TimeSelectView.swift in Sources */,
F933F6C72452C68B00189561 /* PKHUDWideBaseView.swift in Sources */, F933F6C72452C68B00189561 /* PKHUDWideBaseView.swift in Sources */,
......
...@@ -34,7 +34,7 @@ zxcvbnm ...@@ -34,7 +34,7 @@ zxcvbnm
import UIKit import UIKit
import ESTabBarController_swift import ESTabBarController_swift
import JZLocationConverterSwift
@available(iOS 10.0, *) @available(iOS 10.0, *)
@UIApplicationMain @UIApplicationMain
...@@ -55,13 +55,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon ...@@ -55,13 +55,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate,loginDelegate, UITabBarCon
setting_ShareSDK() setting_ShareSDK()
JZLocationConverter.start { (error) in
if error != nil {
print("失败")
}else {
print("成功")
}
}
return true return true
} }
......
...@@ -24,4 +24,6 @@ ...@@ -24,4 +24,6 @@
#import "WXApi.h" #import "WXApi.h"
#import "BLCoordinatesChangeHelper.h"
#endif /* Bridge_Header_h */ #endif /* Bridge_Header_h */
//
// coordinatesChangeHelper.h
//
// Created by 冰泪 on 2017/4/10.
// Copyright © 2017年 冰泪. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <MapKit/MapKit.h>
//#import "coordinatesChange.h"
@interface BLCoordinatesChangeHelper : NSObject
@property (nonatomic,assign) float x_PI;
@property (nonatomic,assign) float PI;
@property (nonatomic,assign) float a;
@property (nonatomic,assign) float ee;
+ (instancetype)shared;
/**
* 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换
* 即 百度 转 谷歌、高德
*/
- (CLLocationCoordinate2D)bl_bd09togcj02:(double) lng andLat:(double) lat ;
/**
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
* 即谷歌、高德 转 百度
*/
- (CLLocationCoordinate2D)bl_gcj02tobd09:(double)lng andLat:(double) lat ;
/**
* WGS84转GCj02
*/
- (CLLocationCoordinate2D)bl_wgs84togcj02:(double)lng andLat:(double) lat;
/**
* GCJ02 转换为 WGS84
*/
- (CLLocationCoordinate2D)bl_gcj02towgs84:(double)lng andLat:(double)lat ;
@end
//
// coordinatesChangeHelper.m
//
// Created by 冰泪 on 2017/4/10.
// Copyright © 2017年 冰泪. All rights reserved.
//
#import "BLCoordinatesChangeHelper.h"
@implementation BLCoordinatesChangeHelper
/**
* 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换
* 即 百度 转 谷歌、高德
*/
- (CLLocationCoordinate2D)bl_bd09togcj02:(double) lng andLat:(double) lat {
double x_pi = 3.14159265358979324 * 3000.0 / 180.0;
double x = lng - 0.0065;
double y = lat - 0.006;
double z = sqrt(x * x + y * y) - 0.00002 * sin(y * x_pi);
double theta = atan2(y, x) - 0.000003 * cos(x * x_pi);
double bl_lng = z * cos(theta);
double bl_lat = z * sin(theta);
CLLocationCoordinate2D coor;
coor.longitude = bl_lng;
coor.latitude = bl_lat;
return coor;
}
/**
* 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换
* 即谷歌、高德 转 百度
*/
- (CLLocationCoordinate2D)bl_gcj02tobd09:(double)lng andLat:(double) lat {
double z = sqrt(lng * lng + lat * lat) + 0.00002 * sin(lat * _x_PI);
double theta = atan2(lat, lng) + 0.000003 * cos(lng * _x_PI);
double bl_lng = z * cos(theta) + 0.0065;
double bl_lat = z * sin(theta) + 0.006;
CLLocationCoordinate2D coor;
coor.longitude = bl_lng;
coor.latitude = bl_lat;
return coor;
}
/**
* WGS84转GCj02
*/
- (CLLocationCoordinate2D)bl_wgs84togcj02:(double)lng andLat:(double) lat {
if ([self out_of_china:lng andLat:lat ]) {
CLLocationCoordinate2D coor;
coor.longitude = lng;
coor.latitude = lat;
return coor;
}else {
double dlat = [self transformlat:lng - 105.0 andLat:lat - 35.0];
double dlng = [self transformlng:lng - 105.0 andLat:lat - 35.0];
double radlat = lat / 180.0 * _PI;
double magic = sin(radlat);
magic = 1 - _ee * magic * magic;
double sqrtmagic = sqrt(magic);
dlat = (dlat * 180.0) / ((_a * (1 - _ee)) / (magic * sqrtmagic) * _PI);
dlng = (dlng * 180.0) / (_a / sqrtmagic * cos(radlat) * _PI);
double bl_lat = lat + dlat;
double bl_lng = lng + dlng;
CLLocationCoordinate2D coor;
coor.longitude = bl_lng;
coor.latitude = bl_lat;
return coor;
}
}
/**
* GCJ02 转换为 WGS84
*/
- (CLLocationCoordinate2D)bl_gcj02towgs84:(double)lng andLat:(double)lat {
if ([self out_of_china:lng andLat:lat ]) {
CLLocationCoordinate2D coor;
coor.longitude = lng;
coor.latitude = lat;
return coor;
}
else {
double dlat = [self transformlat:lng - 105.0 andLat:lat - 35.0];
double dlng = [self transformlng:lng - 105.0 andLat:lat - 35.0];
double radlat = lat / 180.0 * _PI;
double magic = sin(radlat);
magic = 1 - _ee * magic * magic;
double sqrtmagic = sqrt(magic);
dlat = (dlat * 180.0) / ((_a * (1 - _ee)) / (magic * sqrtmagic) * _PI);
dlng = (dlng * 180.0) / (_a / sqrtmagic * cos(radlat) * _PI);
double bl_lat = lat + dlat;
double bl_lng = lng + dlng;
CLLocationCoordinate2D coor;
coor.longitude = bl_lng;
coor.latitude = bl_lat;
return coor;
}
}
- (double)transformlat:(double)lng andLat:(double)lat {
double ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * sqrt(fabs(lng));
ret += (20.0 * sin(6.0 * lng * _PI) + 20.0 * sin(2.0 * lng * _PI)) * 2.0 / 3.0;
ret += (20.0 * sin(lat * _PI) + 40.0 * sin(lat / 3.0 * _PI)) * 2.0 / 3.0;
ret += (160.0 * sin(lat / 12.0 * _PI) + 320 * sin(lat * _PI / 30.0)) * 2.0 / 3.0;
return ret;
}
- (double)transformlng:(double)lng andLat:(double)lat{
double ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * sqrt(fabs(lng));
ret += (20.0 * sin(6.0 * lng * _PI) + 20.0 * sin(2.0 * lng * _PI)) * 2.0 / 3.0;
ret += (20.0 * sin(lng * _PI) + 40.0 * sin(lng / 3.0 * _PI)) * 2.0 / 3.0;
ret += (150.0 * sin(lng / 12.0 * _PI) + 300.0 * sin(lng / 30.0 * _PI)) * 2.0 / 3.0;
return ret;
}
/**
* 判断是否在国内,不在国内则不做偏移
*/
- (BOOL)out_of_china:(double)lng andLat:(double)lat {
return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false);
}
-(instancetype)init{
_x_PI = 3.14159265358979324 * 3000.0 / 180.0;
_PI = 3.1415926535897932384626;
_a = 6378245.0;
_ee = 0.00669342162296594323;
return self;
}
+ (instancetype)shared {
static BLCoordinatesChangeHelper *manager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
manager = [[BLCoordinatesChangeHelper alloc] init];
});
return manager;
}
@end
...@@ -13,7 +13,6 @@ import AMapFoundationKit ...@@ -13,7 +13,6 @@ import AMapFoundationKit
import MAMapKit import MAMapKit
import AMapSearchKit import AMapSearchKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
import JZLocationConverterSwift
protocol ToAndFormSelectViewControllerDelegate { protocol ToAndFormSelectViewControllerDelegate {
func ToAndFormSelectViewControllerSelectAdr(dict:Dictionary<String,Any>,idx:Int) func ToAndFormSelectViewControllerSelectAdr(dict:Dictionary<String,Any>,idx:Int)
...@@ -32,19 +31,23 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -32,19 +31,23 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
func CityListViewControllerLocSelect(loc: cityListDataModel) { func CityListViewControllerLocSelect(loc: cityListDataModel) {
citySelectBtn.setTitle(loc.name, for: .normal) citySelectBtn.setTitle(loc.name, for: .normal)
self.loc = loc self.loc = loc
JZLocationConverter.default.gcj02ToBd09(CLLocationCoordinate2DMake((loc.lat_lon?.lat)!,(loc.lat_lon?.lon)!)) { (result) in let location = BLCoordinatesChangeHelper.shared()?.bl_wgs84togcj02((loc.lat_lon?.lon)!, andLat: (loc.lat_lon?.lat)!)
self.mapView.centerCoordinate = result mapView.setCenter(location!, animated: false)
}
print("2")
} }
@IBAction func citySelectClick(_ sender: UIButton) { @IBAction func citySelectClick(_ sender: UIButton) {
let vc = CityListViewController()
vc.adrDatas = adrDatas! let vc = CityListViewController()
vc.locatStr = loc.name! vc.adrDatas = adrDatas!
vc.delegate = self vc.locatStr = cityName as String
self.navigationController?.pushViewController(vc, animated: true) vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if tableView == searchList { if tableView == searchList {
return searchAdrDatas.count return searchAdrDatas.count
...@@ -162,15 +165,13 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -162,15 +165,13 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
if tableView == searchList { if tableView == searchList {
let model = searchAdrDatas[indexPath.row] let model = searchAdrDatas[indexPath.row]
citySelectBtn.setTitle(model.city!, for: .normal) citySelectBtn.setTitle(model.city!, for: .normal)
print("3",model.location!.lat,model.location!.lon)
JZLocationConverter.default.wgs84ToGcj02(CLLocationCoordinate2D(latitude: (model.location?.lat)!, longitude: (model.location?.lon)!)) { (data) in
self.lat = data.latitude
self.lng = data.longitude
}
print("3.1",lat,lng)
mapView.setCenter(CLLocationCoordinate2DMake(23.142059,113.240747), animated: false)
// mapView.setCenter(CLLocationCoordinate2DMake(lat,lng), animated: false) let locData = BLCoordinatesChangeHelper.shared()?.bl_wgs84togcj02(model.location!.lon!, andLat: model.location!.lat!)
isMove = false
adrName = model.name!
detailAdr = model.address!
mapView.setCenter(CLLocationCoordinate2DMake(locData!.latitude,locData!.longitude), animated: false)
searchList.isHidden = true searchList.isHidden = true
closeBtn.isHidden = true closeBtn.isHidden = true
listViewBG.isHidden = true listViewBG.isHidden = true
...@@ -181,7 +182,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -181,7 +182,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
// citySelectBtn.setTitle(loc.name, for: .normal) print("aksldf == ",adrDatas?.count)
let searchBr = SearchBarView.init() let searchBr = SearchBarView.init()
navBgView.addSubview(searchBr) navBgView.addSubview(searchBr)
...@@ -237,9 +238,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -237,9 +238,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
mapView.zoomLevel = 16 mapView.zoomLevel = 16
mapView.isZoomEnabled = true mapView.isZoomEnabled = true
// JZLocationConverter.default.gcj02ToWgs84(CLLocationCoordinate2DMake((loc.lat_lon?.lat)!,(loc.lat_lon?.lon)!)) { (result) in
// self.mapView.centerCoordinate = result
// }
self.mapView.centerCoordinate = CLLocationCoordinate2DMake(lat,lng) self.mapView.centerCoordinate = CLLocationCoordinate2DMake(lat,lng)
print("==",lat,lng) print("==",lat,lng)
MapBgView.addSubview(mapView!) MapBgView.addSubview(mapView!)
...@@ -304,6 +303,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -304,6 +303,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
// var adrArr:Array<AMapPOI> = [] // var adrArr:Array<AMapPOI> = []
var keyword = "" var keyword = ""
var locName = "" var locName = ""
var adrName:String = ""
var detailAdr:String = ""
var isMove = false
func onPOISearchDone(_ request: AMapPOISearchBaseRequest!, response: AMapPOISearchResponse!) { func onPOISearchDone(_ request: AMapPOISearchBaseRequest!, response: AMapPOISearchResponse!) {
if response.count == 0 { if response.count == 0 {
...@@ -334,7 +336,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -334,7 +336,9 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
introView?.addSubview(contentLbl!) introView?.addSubview(contentLbl!)
} }
titleLbl!.text = response.pois.first?.name
titleLbl!.text = response.pois.first?.name
cityName = response.pois.first?.city as! NSString cityName = response.pois.first?.city as! NSString
locName = response.pois.first?.name as! String locName = response.pois.first?.name as! String
if loc == nil { if loc == nil {
...@@ -345,7 +349,14 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -345,7 +349,14 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
//将行间距设置为28 //将行间距设置为28
paraph.lineSpacing = 3 paraph.lineSpacing = 3
let str = "\(String(describing: response.pois.first!.province!))\(String(describing: response.pois.first!.city!))\(String(describing: response.pois.first!.district!))\( String(describing: response.pois.first!.address!))" var str = "\(String(describing: response.pois.first!.province!))\(String(describing: response.pois.first!.city!))\(String(describing: response.pois.first!.district!))\( String(describing: response.pois.first!.address!))"
print("test11")
if adrName.count > 0 {
print("test12")
isMove = true
titleLbl!.text = adrName
str = detailAdr
}
let attributes = [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 11), let attributes = [NSAttributedString.Key.font:UIFont.systemFont(ofSize: 11),
NSAttributedString.Key.paragraphStyle: paraph] NSAttributedString.Key.paragraphStyle: paraph]
contentLbl!.attributedText = NSAttributedString(string: str, attributes: attributes) contentLbl!.attributedText = NSAttributedString(string: str, attributes: attributes)
...@@ -412,12 +423,15 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -412,12 +423,15 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
let font = UIFont.systemFont(ofSize: fontSize+2) let font = UIFont.systemFont(ofSize: fontSize+2)
return (str as NSString).boundingRect(with: viewSize, options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font:font], context: nil).height return (str as NSString).boundingRect(with: viewSize, options: [.usesLineFragmentOrigin], attributes: [NSAttributedString.Key.font:font], context: nil).height
} }
//移动后刷新 //移动后刷新
func mapView(_ mapView: MAMapView!, mapDidMoveByUser wasUserAction: Bool) { func mapView(_ mapView: MAMapView!, mapDidMoveByUser wasUserAction: Bool) {
let req = AMapPOIAroundSearchRequest() let req = AMapPOIAroundSearchRequest()
//地址 //地址
if isMove {
adrName = ""
detailAdr = ""
}
print("CLLocationDegrees = ",mapView.centerCoordinate.latitude,lat,CGFloat(mapView.centerCoordinate.latitude)) print("CLLocationDegrees = ",mapView.centerCoordinate.latitude,lat,CGFloat(mapView.centerCoordinate.latitude))
req.location = AMapGeoPoint.location(withLatitude: CGFloat(mapView.centerCoordinate.latitude), longitude: CGFloat(mapView.centerCoordinate.longitude)) req.location = AMapGeoPoint.location(withLatitude: CGFloat(mapView.centerCoordinate.latitude), longitude: CGFloat(mapView.centerCoordinate.longitude))
req.requireExtension = true req.requireExtension = true
...@@ -428,7 +442,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo ...@@ -428,7 +442,7 @@ class ToAndFormSelectViewController: BaseViewController, MAMapViewDelegate, CLLo
var annotation:MAPointAnnotation? = nil var annotation:MAPointAnnotation? = nil
func mapViewRegionChanged(_ mapView: MAMapView!) { func mapViewRegionChanged(_ mapView: MAMapView!) {
let request = AMapReGeocodeSearchRequest() let request = AMapReGeocodeSearchRequest()
request.location = AMapGeoPoint.location(withLatitude: CGFloat(mapView.centerCoordinate.latitude), longitude: CGFloat(mapView.centerCoordinate.longitude)) request.location = AMapGeoPoint.location(withLatitude: CGFloat(mapView.centerCoordinate.latitude), longitude: CGFloat(mapView.centerCoordinate.longitude))
......
...@@ -28,7 +28,6 @@ pod 'ViewAnimator' ...@@ -28,7 +28,6 @@ pod 'ViewAnimator'
pod 'SkeletonView' pod 'SkeletonView'
pod 'SnapKit' pod 'SnapKit'
pod 'LGButton' pod 'LGButton'
pod 'JZLocationConverterSwift'
pod 'WYAutoLayout' pod 'WYAutoLayout'
end end
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1100"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForAnalyzing = "YES"
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "8A1DC7C9992BBE1D1BB615909F3A1A42"
BuildableName = "JZLocationConverterSwift.framework"
BlueprintName = "JZLocationConverterSwift"
ReferencedContainer = "container:Pods.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
buildConfiguration = "Debug">
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
buildConfiguration = "Debug"
allowLocationSimulation = "YES">
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES">
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
...@@ -34,11 +34,6 @@ ...@@ -34,11 +34,6 @@
<key>isShown</key> <key>isShown</key>
<false/> <false/>
</dict> </dict>
<key>JZLocationConverterSwift.xcscheme</key>
<dict>
<key>isShown</key>
<false/>
</dict>
<key>Kingfisher.xcscheme</key> <key>Kingfisher.xcscheme</key>
<dict> <dict>
<key>isShown</key> <key>isShown</key>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
#import <Foundation/Foundation.h>
@interface PodsDummy_JZLocationConverterSwift : NSObject
@end
@implementation PodsDummy_JZLocationConverterSwift
@end
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
#ifdef __OBJC__
#import <UIKit/UIKit.h>
#else
#ifndef FOUNDATION_EXPORT
#if defined(__cplusplus)
#define FOUNDATION_EXPORT extern "C"
#else
#define FOUNDATION_EXPORT extern
#endif
#endif
#endif
FOUNDATION_EXPORT double JZLocationConverterSwiftVersionNumber;
FOUNDATION_EXPORT const unsigned char JZLocationConverterSwiftVersionString[];
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JZLocationConverterSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/JZLocationConverterSwift
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
framework module JZLocationConverterSwift {
umbrella header "JZLocationConverterSwift-umbrella.h"
export *
module * { export * }
}
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/JZLocationConverterSwift
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -suppress-warnings
PODS_BUILD_DIR = ${BUILD_DIR}
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
PODS_ROOT = ${SRCROOT}
PODS_TARGET_SRCROOT = ${PODS_ROOT}/JZLocationConverterSwift
PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
SKIP_INSTALL = YES
USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
...@@ -203,7 +203,6 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then ...@@ -203,7 +203,6 @@ if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/ESTabBarController-swift/ESTabBarController_swift.framework" install_framework "${BUILT_PRODUCTS_DIR}/ESTabBarController-swift/ESTabBarController_swift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework" install_framework "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework"
install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework" install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JZLocationConverterSwift/JZLocationConverterSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework" install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/LGButton/LGButton.framework" install_framework "${BUILT_PRODUCTS_DIR}/LGButton/LGButton.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
...@@ -224,7 +223,6 @@ if [[ "$CONFIGURATION" == "Release" ]]; then ...@@ -224,7 +223,6 @@ if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "${BUILT_PRODUCTS_DIR}/ESTabBarController-swift/ESTabBarController_swift.framework" install_framework "${BUILT_PRODUCTS_DIR}/ESTabBarController-swift/ESTabBarController_swift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework" install_framework "${BUILT_PRODUCTS_DIR}/Hue/Hue.framework"
install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework" install_framework "${BUILT_PRODUCTS_DIR}/IQKeyboardManagerSwift/IQKeyboardManagerSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/JZLocationConverterSwift/JZLocationConverterSwift.framework"
install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework" install_framework "${BUILT_PRODUCTS_DIR}/Kingfisher/Kingfisher.framework"
install_framework "${BUILT_PRODUCTS_DIR}/LGButton/LGButton.framework" install_framework "${BUILT_PRODUCTS_DIR}/LGButton/LGButton.framework"
install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework" install_framework "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment