CMMapLauncher 1.1.0

CMMapLauncher 1.1.0

测试已测试
语言语言 Obj-CObjective C
许可 MIT
发布最后发布2014年12月

Joe Hughes维护。



  • Citymapper

CMMapLauncher是一个iOS小库,可以快速、轻松地在各种地图应用中显示方向。要使用它,只需将CMMapLauncher.hCMMapLauncher.m添加到您的项目中即可。

要检查是否在用户的设备上存在支持的地图应用程序

BOOL installed = [CMMapLauncher isMapAppInstalled:CMMapAppCitymapper];

然后,在应用程序中启动方向

CLLocationCoordinate2D bigBen = CLLocationCoordinate2DMake(51.500755, -0.124626);
[CMMapLauncher launchMapApp:CMMapAppCitymapper
            forDirectionsTo:[CMMapPoint mapPointWithName:@"Big Ben"
                                              coordinate:bigBen]];

CMMapLauncher目前知道如何在以下地图应用程序中显示方向

  • Apple Maps — CMMapAppAppleMaps
  • Citymapper — CMMapAppCitymapper
  • Google Maps — CMMapAppGoogleMaps
  • Navigon — CMMapAppNavigon
  • The Transit App — CMMapAppTheTransitApp
  • Waze — CMMapAppWaze
  • Yandex Navigator — CMMapAppYandex

如果您知道其他提供方向且公开URL方案以从其他应用程序启动的应用程序,该项目希望将它们整合进来!欢迎提供URL方案的Pull requests和issue。

CMMapLauncher最初由Citymapper创建,但现在作为MIT许可证发布,以惠及iOS开发者社区。