如何在Iphone中使用Google Map的API?

| 我想弄清楚Google Map's API如何为我们提供指导。 创建一个示例工具,在这里我可以将自己的位置用作起点,然后选择另一个位置,并且可以在现有应用程序中的文本和地图上查看行车路线(驾车和步行)。 我没有使用过Google Map API,所以我对此非常幼稚 谁能帮我这个?     
已邀请:
        尝试这个,
NSString *urlstring=[NSString stringWithFormat:@\"http://maps.google.com/?saddr=%f,%f&daddr=%f,%f\",sourcelocation.latitude,sourcelocation.longitude,destinationlocation.latitude,destinationlocation.longitude];

[[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlstring]];
代码的作用是,它将显示您在Google地图上的源位置和目标位置之间的路线。 如果您没有经度,则可以这样做:-
 NSString *source=@\"NorthCarolina\";
    NSString *destination=@\"SouthCarolina\";

    NSString *urlstring=[NSString stringWithFormat:@\"http://maps.google.com/?saddr=%@&daddr=%@\",source,destination];

    [[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlstring]];
希望对您有帮助。编码愉快:)     

要回复问题请先登录注册