var marker = new google.maps.Marker({
position: myLatlng,
map: map,
draggable:true
});
marker.setIcon(/** @type {google.maps.Icon} */({
url: place.icon,
size: new google.maps.Size(71, 71),
origin: new google.maps.Point(0, 0),
anchor: new google.maps.Point(17, 34),
scaledSize: new google.maps.Size(35, 35)
}));
marker.setPosition(place.geometry.location);
marker.setVisible(true);
答案 0 :(得分:0)
尝试在loadSpots()
结束时调用initializeMaps()
,否则可能会在map
初始化之前访问{{1}}。