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

Rya*_* Wu 2 google-maps ios afnetworking-2

根据谷歌的文档,信息窗口是在我得到图像之前呈现的。

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.
Run Code Online (Sandbox Code Playgroud)

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

顺便说一句,我正在按照Google 的本教程从 xib 创建信息窗口

参考:

如何强制刷新 Google Maps iOS SDK 中标记信息窗口的内容

iOS:动态标记信息窗口

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

zig*_*gah 5

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

marker.tracksInfoWindowChanges = true
Run Code Online (Sandbox Code Playgroud)

在 mapView 标记信息窗口中,然后在加载图像后(即在“成功:”完成处理程序中,我设置图像然后设置:

marker.tracksInfoWindowChanges = false
Run Code Online (Sandbox Code Playgroud)

请在此处查看 trackInfoWindowChanges 的官方文档