マーカーを追加するとanimation: google.maps.Animation.DROP
、ドロップ アニメーションの実行中にマーカーが押しつぶされます (幅が通常よりも小さくなります)。
これは、アニメーションが実行されているときにのみ発生します。アニメーションが完了すると、マーカーは通常のサイズに戻ります。
明確化: これは Backbone.Marionette.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);