Tôi muốn mở Google Map App trong iOS 6 theo lập trình. tôi đã cố gắng để mở bản đồ trong bằng cách thông qua url - bản đồ ..... nhưng nó vẫn đang mở trong SafariMở ứng dụng Google Maps trong iOS 6
5
A
Trả lời
11
[[UIApplication sharedApplication] canOpenURL:
[NSURL URLWithString:@"comgooglemaps://"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:
@"comgooglemaps://?center=40.765819,-73.975866&zoom=14&views=traffic"]];
tham khảo: https://developers.google.com/maps/documentation/ios/urlscheme
0
thử này
Tên miền phải là maps.apple.com.
Thông số không thể là q = * nếu giá trị là URL (vì vậy KML không được chọn). Các tham số không thể bao gồm view = text hoặc dirflg = r.
https://developer.apple.com/library/safari/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html#//apple_ref/doc/uid/TP40007894-SW1