我创建了一个谷歌地图并添加了一些标记.每个标记具有单字母标签("A","B","C").然后我为每个标记设置动画以进行反弹.
这一切都很好用一个令人讨厌的例外:标签("A","B","C")不会与标记一起反弹,所以看起来很奇怪.
JS/jQuery如下.我这里还有一个代码笔来显示问题.
有关如何使标签与标记一起弹跳的任何建议?
$(function () {
var map;
var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var labelIndex = 0;
var markers = [];
// Map locations
var mapLocations = [{
"name": "Windwood Hollow Park",
"description": "This is the description for location 1",
"position": {
"lat": 33.942253,
"lng": -84.278242
}
}, {
"name": "Peeler Road Linear Park",
"description": "This is the description for location 2",
"position": {
"lat": 33.940143,
"lng": -84.278394
}
}, {
"name": "Winters Chapel Animal Hospital",
"description": "This …Run Code Online (Sandbox Code Playgroud)