gpt4 book ai didi

ios - 从 GMSMapView 隐藏地铁站

转载 作者:行者123 更新时间:2023-11-29 02:20:43 29 4
gpt4 key购买 nike

我已经集成了适用于 iOS 的 Google Maps API。我想在纽约市的 map 上隐藏地铁站。有没有办法用 API 做到这一点?

最佳答案

您可以使用 UIWebViewtry 调用 Javascript 来从 Objective-C 执行 JS 函数

在您的 UIViewController 中实现 UIWebView 的委托(delegate)方法 webViewDidFinishLoad: 并在其中调用 [graphView stringByEvaluatingJavaScriptFromString:@"methodName()"];

然后添加

var styleArray = [

featureType: "poi.transit.station",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
];

关于ios - 从 GMSMapView 隐藏地铁站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28175067/

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