[討論] Google Maps程式碼
https://developers.google.com/maps/documentation/javascript/markers#animate
想請問下面這行程式碼要如何理解呢?(黃標處)
function toggleBounce() {
if (marker.getAnimation() !== null) {
marker.setAnimation(null);
} else {
marker.setAnimation(google.maps.Animation.BOUNCE);
}
}
ps. 文件說明:
BOUNCE 指出標記在原地彈跳。
彈跳標記會持續彈跳,直到它的 animation 屬性明確設成 null 才會停止。
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 219.84.234.215
※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1459368560.A.DC2.html
→
03/31 14:51, , 1F
03/31 14:51, 1F
→
03/31 14:52, , 2F
03/31 14:52, 2F
→
03/31 14:54, , 3F
03/31 14:54, 3F
推
03/31 15:04, , 4F
03/31 15:04, 4F
推
04/01 01:20, , 5F
04/01 01:20, 5F
→
04/01 03:00, , 6F
04/01 03:00, 6F
推
04/01 17:03, , 7F
04/01 17:03, 7F
推
04/01 21:08, , 8F
04/01 21:08, 8F
Web_Design 近期熱門文章
PTT數位生活區 即時熱門文章