Javascript 谷歌地图标记';s随着动画的执行而挤压
当我用Javascript 谷歌地图标记';s随着动画的执行而挤压,javascript,google-maps-api-3,backbone.js,marionette,Javascript,Google Maps Api 3,Backbone.js,Marionette,当我用animation:google.maps.animation.DROP添加标记时,在执行DROP动画时,标记会被压扁(其宽度小于正常值) 这仅在执行动画时发生。 动画完成后,标记将恢复为正常大小 一些澄清: 这是在Backbone.marionete.ItemView中执行的 相关代码为: // For each model add a marker _.each(this.model.models, function (model) { var coordinates = mo
animation:google.maps.animation.DROP添加标记时,在执行DROP动画时,标记会被压扁(其宽度小于正常值)
这仅在执行动画时发生。
动画完成后,标记将恢复为正常大小
一些澄清:
这是在Backbone.marionete.ItemView中执行的
相关代码为:
// For each model add a marker
_.each(this.model.models, function (model) {
var coordinates = model.get('coordinate'),
position = new google.maps.LatLng(coordinates.latitude, coordinates.longitude),
marker;
// Don't add the same marker twice.
if (!this.markers[model.get('id')]) {
marker = new google.maps.Marker({
position: position,
title: model.get('name'),
map: this.map
});
// Save the marker
this.markers[model.get('id')] = marker;
}
// Extend the bounds of the map
bounds.extend(position);
}, this);
this.map.fitBounds(bounds);
请发布你的密码,我们不是魔术师。。我们中的一些人可能是,或者更好,举一个jsfiddle.com的例子。。这种问题如果无法重现,通常很难调试。