public static interface AMap.ImageInfoWindowAdapter extends AMap.InfoWindowAdapter
AMap.ImageInfoWindowAdapter, InfoWindow会被转为图片,拖动地图时会跟随MarkerMarker.showInfoWindow()同样可以触发上面两个回调。AMap.ImageInfoWindowAdapter is added, which converts the InfoWindow into an image, and it will follow the Marker when dragging the map.Marker.showInfoWindow() can also trigger these two callbacks.| 限定符和类型 | 方法和说明 |
|---|---|
long |
getInfoWindowUpdateTime()
注意,使用
AMap.ImageInfoWindowAdapter后InfoWindow作为View本身的功能被减弱,比如动态更新图片,播放Gif图片等等均无法使用。 |
getInfoContents, getInfoWindowlong getInfoWindowUpdateTime()
AMap.ImageInfoWindowAdapter后InfoWindow作为View本身的功能被减弱,比如动态更新图片,播放Gif图片等等均无法使用。
设置此接口返回值之后,会定期(默认周期无穷大)调用一个 AMap.InfoWindowAdapter.getInfoWindow(Marker) 并将View转换为图片
由于将View转成图片会比较耗时,不能一直调用,而设置时间间隔可以减少一定的耗时
单位为 ms
如果返回值 小于或等于 0,则认为是无穷大
如果返回值 (0,100] , 则认为是100(如果频繁将View转成图片,内存抖动会很严重,建议这个值不要太低)
如果这个想实现更小的时间间隔或者不想受这个接口约束,可以保持返回默认值,并自行设置计时器,调用Marker.showInfoWindow() 也可以触发调用 AMap.InfoWindowAdapter.getInfoWindow(Marker) 并将View转换为图片
自定义整个信息窗口属性间隔时间
>
Note: After using AMap.ImageInfoWindowAdapter, the functionality of the InfoWindow as a View itself is weakened, such as dynamic image updates, playing GIF images, etc., which cannot be used.
If you want to dynamically update the infowindow content, please carefully review the update mechanism of this interface.
After setting the return value of this interface, it will periodically (default period is infinite) call AMap.InfoWindowAdapter.getInfoWindow(Marker) and convert the View into an image.
Since converting the View into an image is time-consuming, it cannot be called continuously, and setting a time interval can reduce some of the time consumption.
The unit is ms. If the return value is less than or equal to 0, it is considered infinite.
If the return value is (0,100], it is considered 100 (if the View is frequently converted into an image, memory jitter will be severe, so it is recommended not to set this value too low).
If you want to achieve a smaller time interval or do not want to be constrained by this interface, you can keep the default return value and set up a timer yourself. Calling Marker.showInfoWindow() can also trigger the call to AMap.InfoWindowAdapter.getInfoWindow(Marker) and convert the View into an image.
Customize the interval time for the entire info window attributes.
>