我正在绘制路线google map
并且刚刚意识到它一切正常,除了我发送在韩国某处的坐标.(准确地说是南方)
JSON
数据null
即使坐标是正确的并且保持"零结果".
我曾尝试过非洲,澳大利亚,欧洲甚至中国和日本,但韩国的任何地方都无法运作.
我在这里错过了什么..?
编辑
所以我想这不仅仅是韩国蒙古和印度尼西亚是相同的,他们的地理编码与航路点无法合作以获得路线.
比较韩国和德国的结果 -
韩国
{"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJzWXFYYuifDUR64Pq5LTtioU",
"types" : [ "locality", "political" ]
},
{
"geocoder_status" : "OK",
"place_id" : "ChIJNc0j6G3raDURpwhxJHTL2DU",
"types" : [ "locality", "political" ]
}],"routes" : [],"status" : "ZERO_RESULTS"}
Run Code Online (Sandbox Code Playgroud)
德国
{"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJAVkDPzdOqEcRcDteW0YgIQQ",
"types" : [ "locality", "political" ]},
{
"geocoder_status" : "OK",
"place_id" : "ChIJ2V-Mo_l1nkcRfZixfUq4DAE",
"types" : [ "locality", "political" ]}],"routes" …
Run Code Online (Sandbox Code Playgroud) 我正在关注这个问题的唯一答案 -
但是cameraWithPosition似乎不起作用.已过时?
//Get new input
AVCaptureDevice *newCamera = nil;
if(((AVCaptureDeviceInput*)currentCameraInput).device.position == AVCaptureDevicePositionBack)
{
newCamera = [self cameraWithPosition:AVCaptureDevicePositionFront];
}
else
{
newCamera = [self cameraWithPosition:AVCaptureDevicePositionBack];
}
Run Code Online (Sandbox Code Playgroud) 关于这个问题,SO上有几个主题,但没有一个真正得到回答.
显然它与AVAudioPlayer有关,但就是这样.似乎没有人能够指出究竟要解决的问题.
在我的情况下,我收到错误消息,但一切正常.音频文件播放,没有崩溃,没有.无论如何,我仍然想知道为什么我收到错误信息并最终完全消除它.
此错误根本不会显示.它几乎从来没有发生,但也许每40次尝试我会得到一个...它是如此随机,所以我不知道该怎么办.
有人可以帮帮我吗?
我首先在Illustrator或Photoshop中3D旋转平面图形,获得在设计工具中应用于它的精确角度(x,y和z),然后将相同的角度应用于放置在图像顶部的UILabel,以便在视觉上同步它们.
我已经弄清楚如何使用CATransform3DConcat同时旋转2轴,但后来我不知道如何应用第三个.
float angleX = -18 * M_PI / 180;
CATransform3D t1 = CATransform3DMakeRotation(angleX, 1, 0, 0);
float angleY = -26 * M_PI / 180;
CATransform3D t2 = CATransform3DMakeRotation(angleY, 0, 1, 0);
CATransform3D combo1 = CATransform3DConcat(t1, t2);
self.labelPlay.layer.transform = combo1;
Run Code Online (Sandbox Code Playgroud)
编辑
现在尝试这个,但仍然没有好处.尝试了不同订单的所有组合,但没有.
float angleX = -18 * M_PI / 180;
CATransform3D t1 = CATransform3DMakeRotation(angleX, 1, 0, 0);
float angleY = -26 * M_PI / 180;
CATransform3D t2 = CATransform3DMakeRotation(angleY, 0, 1, 0);
float angleZ = 8 * M_PI / 180; …
Run Code Online (Sandbox Code Playgroud) 我正在使用Parse和geoPointForCurrentLocationInBackground我可以在收到位置后停止更新,而不必手动停止它.
在使用CLLocationManager接收位置后,如何立即停止更新位置?
编辑
我知道[self.locationManager stopUpdatingLocation]; 阻止它.我真正要问的是,我怎么知道我第一次收到位置然后立即停止?
我一直在关注这个教程,它可以帮助我在地图上的2个抽头位置之间绘制路线方向(折线).但是我不需要点击位置,因为当我想向用户显示路线时,我已经拥有了原点和目的地的纬度和经度.
我可以使用我已经拥有的纬度和经度数组创建GMSPath吗?如果是这样,怎么样?
- (void)addDirections:(NSDictionary *)json {
NSDictionary *routes = [json objectForKey:@"routes"][0];
NSDictionary *route = [routes objectForKey:@"overview_polyline"];
NSString *overview_route = [route objectForKey:@"points"];
GMSPath *path = [GMSPath pathFromEncodedPath:overview_route];
GMSPolyline *polyline = [GMSPolyline polylineWithPath:path];
polyline.map = self.mainGoogleMap;}
Run Code Online (Sandbox Code Playgroud) 我使用CLLocationCoordinate2D获取用户的当前位置,然后将其用于Parse的nearGeoPoint.
我知道我可以简单地使用geoPointForCurrentLocationInBackground但我宁愿用CLLocationCoordinate2D检索.
objective-c ios parse-platform geopoints cllocationcoordinate2d
objective-c ×7
ios ×3
avfoundation ×2
google-maps ×2
swift ×2
geopoints ×1
gmsmapview ×1
timeout ×1