gpt4 book ai didi

swift - 谷歌标记聚类。如何将此库添加到项目中? swift

转载 作者:行者123 更新时间:2023-11-30 10:33:08 26 4
gpt4 key购买 nike

有多个有关安装 Google 标记聚类库的说明,例如:https://developers.google.com/maps/documentation/ios-sdk/utility/setup https://github.com/googlemaps/google-maps-ios-utils/blob/master/Swift.md

但它们都不适合我。而且,他们之间也存在着一些矛盾。我尝试添加 pod,尝试添加桥接文件等。我的“导入”不知道集群之类的东西

我怎样才能让它发挥作用?

最佳答案

我找到了解决这个问题的方法。按照 Google 指南中提供的方式添加文件后,请执行以下步骤:

  1. 创建文件“AppName-Bridging-Header.h”。
  2. 像这样导入新库:

    #ifndef Bridging_Header_h

    #define Bridging_Header_h

    #import“GMUMarkerClustering.h”

    #import“GMUGeoJSONParser.h”

    #import“GMUKMLParser.h”

    #import“GMUGeometryRenderer.h”

    #endif/* Bridging_Header_h */

  3. 转到项目设置。

  4. 选择“目标”字段和“build设置”菜单。
  5. 搜索“Swift 编译器”设置。
  6. 添加设置“Objective-c 桥接 header ”和文件路径,在我的例子中:“AppName/App/AppName-Bridging-Header.h enter image description here

完成!您的应用程序中有此聚类库。

关于swift - 谷歌标记聚类。如何将此库添加到项目中? swift ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58661126/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com