自2018年10月18日起,高德开发者论坛除车机板块外,其他板块将停止发帖与维护,如您有使用问题请 提交工单 联系我们,感谢您的理解。

查看: 312|回复: 6
打印 上一主题 下一主题

[使用疑问] [已解决]打车费用显示为0 求解决

[复制链接]
最佳答案
0 

3

主题

11

帖子

43

积分

新手上路

Rank: 1

积分
43
跳转到指定楼层
楼主
发表于 2015-11-5 09:08:11 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
发表帖子
API/SDK版本号: 最新版ios 搜索sdk
产品: 2D地图
手机型号: iphone 5s
使用接口: AMapSearchType_NaviDrive[搜索方式]
AMapNavigationSearchRequest *request = [[AMapNavigationSearchRequest alloc] init];

    // 设置路径规划方式
//    request.searchType = asearchType;
    request.searchType = AMapSearchType_NaviDrive;

    request.origin = [AMapGeoPoint locationWithLatitude:_currentLocation.coordinate.latitude longitude:_currentLocation.coordinate.longitude];
    request.destination = [AMapGeoPoint locationWithLatitude:_destinationPoint.coordinate.latitude longitude:_destinationPoint.coordinate.longitude];
    [_search AMapNavigationSearch:request];

返回的数据:
self.route___{origin: {39.831470, 116.288895}, destination: {39.844372, 116.295670}, taxiCost: 0.00, paths: [
Path: {distance: 2708, duration: 480, strategy: 速度最快, tolls: 0.00, tollDistance: 0, steps:[
Step: {instruction: 沿航丰路向西行驶274米右转, orientation: 西, road: 航丰路, distance: 274, duration: 60, polyline: 116.289008,39.831229;116.287803,39.830898;116.287491,39.830810;116.286339,39.830486;116.285980,39.830406, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}
Step: {instruction: 沿内环西路向北行驶634米右转进入主路, orientation: , road: 内环西路, distance: 634, duration: 120, polyline: 116.285973,39.830402;116.285866,39.830654;116.285599,39.831306;116.285301,39.832005;116.284805,39.833218;116.284637,39.833668;116.284569,39.833858;116.284531,39.834041;116.284477,39.834499;116.284462,39.834579;116.284393,39.835255;116.284340,39.835865, action: 右转, assistantAction: 进入主路, tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}
Step: {instruction: 沿富丰路向东行驶259米左转, orientation: , road: 富丰路, distance: 259, duration: 60, polyline: 116.284317,39.835972;116.285522,39.836086;116.285697,39.836098;116.286834,39.836189, action: 左转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}
Step: {instruction: 沿南四环西路辅路途径西四环南路辅路向北行驶594米右转, orientation: , road: 南四环西路辅路, distance: 594, duration: 60, polyline: 116.287323,39.836337;116.287277,39.836662;116.287071,39.837547;116.286987,39.837952;116.286841,39.838589;116.286789,39.838829;116.286705,39.839202;116.286476,39.840255;116.286392,39.840630;116.286368,39.840693;116.286285,39.841072;116.286079,39.841640, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}
Step: {instruction: 沿新华街向东北行驶889米右转, orientation: 东北, road: 新华街, distance: 889, duration: 120, polyline: 116.286064,39.841640;116.287766,39.842278;116.288856,39.842651;116.289650,39.842941;116.290916,39.843426;116.291939,39.843784;116.293449,39.844322;116.294037,39.844486;116.294548,39.844634;116.295402,39.844879;116.295578,39.844883, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}

Step: {instruction: 沿造甲街向南行驶58米到达目的地, orientation: , road: 造甲街, distance: 58, duration: 60, polyline: 116.295578,39.844883;116.295715,39.844379, action: , assistantAction: 到达目的地, tolls: 0.00, tollDistance: 0, tollRoad: , cities: [], tmcs: []}]}], transits: []}


CGFloat taxiCost; // 出租车费用(单位:元) 返回的 为0.00元
求指教



回复

使用道具 举报

最佳答案
66 

37

主题

1135

帖子

2883

积分

超级版主

Rank: 8Rank: 8

积分
2883
沙发
发表于 2015-11-5 10:30:40 | 只看该作者    本楼为最佳答案   
同样的代码,我的结果:
(lldb) po response.route
{origin: {39.831470, 116.288895}, destination: {39.844372, 116.295670}, taxiCost: 13.00, paths: [
Path: {distance: 2708, duration: 480, strategy: 速度最快, tolls: 0.00, tollDistance: 0, steps:[
Step: {instruction: 沿航丰路向西行驶274米右转, orientation: 西, road: 航丰路, distance: 274, duration: 60, polyline: 116.289008,39.831229;116.287803,39.830898;116.287491,39.830810;116.286339,39.830486;116.285980,39.830406, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 109, status: 2}
TMC: {lcode: , distance: 28, status: 2}
TMC: {lcode: , distance: 137, status: 1}]}
Step: {instruction: 沿内环西路向北行驶634米右转进入主路, orientation: 北, road: 内环西路, distance: 634, duration: 120, polyline: 116.285973,39.830402;116.285866,39.830654;116.285599,39.831306;116.285301,39.832005;116.284805,39.833218;116.284637,39.833668;116.284569,39.833858;116.284531,39.834041;116.284477,39.834499;116.284462,39.834579;116.284393,39.835255;116.284340,39.835865, action: 右转, assistantAction: 进入主路, tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 187, status: 1}
TMC: {lcode: , distance: 140, status: 1}
TMC: {lcode: , distance: 74, status: 1}
TMC: {lcode: , distance: 71, status: 1}
TMC: {lcode: , distance: 8, status: 1}
TMC: {lcode: , distance: 75, status: 1}
TMC: {lcode: , distance: 79, status: 1}]}
Step: {instruction: 沿富丰路向东行驶259米左转, orientation: 东, road: 富丰路, distance: 259, duration: 60, polyline: 116.284317,39.835972;116.285522,39.836086;116.285697,39.836098;116.286834,39.836189, action: 左转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 103, status: 1}
TMC: {lcode: , distance: 14, status: 1}
TMC: {lcode: , distance: 142, status: 1}]}
Step: {instruction: 沿南四环西路辅路途径西四环南路辅路向北行驶594米右转, orientation: 北, road: 南四环西路辅路, distance: 594, duration: 60, polyline: 116.287323,39.836337;116.287277,39.836662;116.287071,39.837547;116.286987,39.837952;116.286841,39.838589;116.286789,39.838829;116.286705,39.839202;116.286476,39.840255;116.286392,39.840630;116.286368,39.840693;116.286285,39.841072;116.286079,39.841640, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 36, status: 2}
TMC: {lcode: , distance: 99, status: 2}
TMC: {lcode: , distance: 45, status: 2}
TMC: {lcode: , distance: 71, status: 2}
TMC: {lcode: , distance: 27, status: 2}
TMC: {lcode: , distance: 41, status: 2}
TMC: {lcode: , distance: 119, status: 2}
TMC: {lcode: , distance: 49, status: 2}
TMC: {lcode: , distance: 42, status: 2}
TMC: {lcode: , distance: 65, status: 2}]}
Step: {instruction: 沿新华街向东北行驶889米右转, orientation: 东北, road: 新华街, distance: 889, duration: 120, polyline: 116.286064,39.841640;116.287766,39.842278;116.288856,39.842651;116.289650,39.842941;116.290916,39.843426;116.291939,39.843784;116.293449,39.844322;116.294037,39.844486;116.294548,39.844634;116.295402,39.844879;116.295578,39.844883, action: 右转, assistantAction: , tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 161, status: 1}
TMC: {lcode: , distance: 177, status: 1}
TMC: {lcode: , distance: 121, status: 1}
TMC: {lcode: , distance: 95, status: 1}
TMC: {lcode: , distance: 142, status: 1}
TMC: {lcode: , distance: 53, status: 1}
TMC: {lcode: , distance: 47, status: 1}
TMC: {lcode: , distance: 93, status: 1}]}
Step: {instruction: 沿造甲街向南行驶58米到达目的地, orientation: 南, road: 造甲街, distance: 58, duration: 60, polyline: 116.295578,39.844883;116.295715,39.844379, action: , assistantAction: 到达目的地, tolls: 0.00, tollDistance: 0, tollRoad: , cities: [
city: {city: 北京市, citycode: 010, adcode: 110100, num: 0, Districts: [
district: {name: 丰台区, adcode: 110106, citycode: (null), center: (null), polyline: [(null)], level: (null), subDistricts: []}]}], tmcs: [
TMC: {lcode: , distance: 58, status: 1}]}]}], transits: []}

(lldb)

你再重新查询一下
回复 支持 反对

使用道具 举报

最佳答案
1 

8

主题

27

帖子

74

积分

新手上路

Rank: 1

积分
74
板凳
发表于 2015-11-5 11:03:19 | 只看该作者
chenjie1986928 发表于 2015-11-5 10:30
同样的代码,我的结果:
(lldb) po response.route
{origin: {39.831470, 116.288895}, destination: {39.8 ...

请问下你的这些数据是在哪个回调方法里面写的呢?回调里面是不是用了AMapRoute这个函数呢?求告,我的在onNavigationSearchDone方法里面用AMapRoute这个就崩溃了
要想人不知,除非己莫为.
回复 支持 反对

使用道具 举报

最佳答案
66 

37

主题

1135

帖子

2883

积分

超级版主

Rank: 8Rank: 8

积分
2883
地板
发表于 2015-11-5 15:46:09 | 只看该作者
小苹果儿123 发表于 2015-11-5 11:03
请问下你的这些数据是在哪个回调方法里面写的呢?回调里面是不是用了AMapRoute这个函数呢?求告,我的在o ...

就是回调函数的response对象啊~你看看demo怎么用的
回复 支持 反对

使用道具 举报

最佳答案
0 

3

主题

11

帖子

43

积分

新手上路

Rank: 1

积分
43
5#
 楼主| 发表于 2015-11-6 10:04:26 | 只看该作者
chenjie1986928 发表于 2015-11-5 10:30
同样的代码,我的结果:
(lldb) po response.route
{origin: {39.831470, 116.288895}, destination: {39.8 ...

我用的手机系统是7.1.2  您呢
回复 支持 反对

使用道具 举报

最佳答案
0 

3

主题

11

帖子

43

积分

新手上路

Rank: 1

积分
43
6#
 楼主| 发表于 2015-11-6 10:05:04 | 只看该作者
高德小莫 发表于 2015-11-5 11:03
请问下你的这些数据是在哪个回调方法里面写的呢?回调里面是不是用了AMapRoute这个函数呢?求告,我的在o ...

用的最新的sdk
回复 支持 反对

使用道具 举报

最佳答案
66 

37

主题

1135

帖子

2883

积分

超级版主

Rank: 8Rank: 8

积分
2883
7#
发表于 2015-11-6 15:32:06 | 只看该作者

这个跟系统没关系哦~你看看demo吧,把你的坐标输入到demo中,也是po response.route都是能正常返回的
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|小黑屋|高德开发者论坛

Copyright ©2014 高德开发者论坛.All Rights Reserved |京ICP证070711号

意见反馈 常见问题 服务条款 联系我们
快速回复 返回顶部 返回列表