ios - 如何使用 AFnetworking 图像缓存刷新 iOS 谷歌地图中的标记信息窗口?

标签 ios google-maps afnetworking-2

根据 Google 的文档,信息窗口是在我获取图像之前渲染的。

Note: The info window is rendered as an image each time it is displayed on the map. 
This means that any changes to its properties while it is active will not be immediately visible.     
The contents of the info window will be refreshed the next time that it is displayed.

是否有人在使用 AFNetworking 的图像缓存并成功更新信息窗口 View 而不污染标记的片段? 我已经搜索过,但找不到适合我的场景的任何解决方案。我在标记的片段中有地址和一些其他信息,所以我不能将其用作标志。

顺便说一句,我正在关注 this tutorial来自 Google 从 xib 创建信息窗口

引用:

How to force refresh contents of the markerInfoWindow in Google Maps iOS SDK

iOS: Dynamic Marker Info Window

https://developers.google.com/maps/documentation/ios/marker#info_windows

最佳答案

我通过设置解决了类似的问题:

marker.tracksInfoWindowChanges = true

在 mapView markerInfoWindow 中,然后在图像加载后(即在“成功:”完成处理程序中,我设置图像然后设置:

marker.tracksInfoWindowChanges = false

还有 see the offical docs for tracksInfoWindowChanges here .

关于ios - 如何使用 AFnetworking 图像缓存刷新 iOS 谷歌地图中的标记信息窗口?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27097712/

相关文章:

ios - MPMoviePlayerController 方向错误在设备上但不在模拟器中

ios - 如何设置GPUImagePicture的边框

ios - UIViewController 中的 applicationDidBecomeActive?

ios - 使用 UITableViewCell 进行委托(delegate)

java - 如何在android中的onMapReady()中获取onNavigationItemSelected()值

ios - 如何通过 AFNetworking 创建简单的 Http 请求

javascript - 如何在谷歌地图的彩色多边形上显示街道编号?

javascript - gmap3 获取集群位置

ios - ios编程中的网络处理

ios - 在 viewDidLoad 中执行对服务器的调用