作者热门文章
- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
无法让此 SVG 动画化为 Google map 上的标记
<svg width="120px" height="120px" viewBox="0 0 120 120" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g fill="none" fill-rule="evenodd" stroke-width="1" stroke="black" stroke-opacity="0.3">
<circle cx="50" cy="50" r="50">
<animate attributeName="r" begin="0s" dur="3s" values="0;50" keyTimes="0;1" keySplines="0.1,0.2,0.3,1" calcMode="spline" repeatCount="indefinite"></animate>
<animate attributeName="stroke-opacity" begin="0s" dur="3s" values="0;.3;.3;0" repeatCount="indefinite"></animate>
</circle>
<circle cx="50" cy="50" r="30">
<animate attributeName="r" begin="-1s" dur="3s" values="0;50" keyTimes="0;1" keySplines="0.1,0.2,0.3,1" calcMode="spline" repeatCount="indefinite"></animate>
<animate attributeName="stroke-opacity" begin="-1s" dur="3s" values="0;.3;.3;0" repeatCount="indefinite"></animate>
</circle>
</g>
</svg>
最佳答案
如评论中所述,在标记选项中设置 optimized: false
。
来自docs :
Disable optimized rendering for animated GIFs or PNGs, or when each marker must be rendered as a separate DOM element (advanced usage only).
关于javascript - 带动画的 Google map SVG 标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38404566/
我是一名优秀的程序员,十分优秀!