4

不能得到這個SVG動畫作爲谷歌地圖標記谷歌地圖SVG標記動畫

<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>

+0

你能爲此創建一個小提琴嗎? –

+4

設置標記的'優化'選項爲'false' –

+0

@ Dr.Molle可以添加那個答案,以便我可以接受它嗎? –

回答

3

正如在評論中提到,設置標記選項optimized: false

docs

禁用 優化渲染爲動畫GIF或PNG,或當每個標記 必須呈現爲單獨的DOM元素(僅高級的使用)。

+0

嘿,我欣賞巨魔 –