Google maps api 3 谷歌地图中的自定义标记图标会在动画之前弹出

Google maps api 3 谷歌地图中的自定义标记图标会在动画之前弹出,google-maps-api-3,google-maps-markers,Google Maps Api 3,Google Maps Markers,我有以下代码向地图添加标记: var marker = new google.maps.Marker({ icon: '/pin.png', map: map, position: latlng, draggable: false, title: trip_name, animation: google.maps.Animation.DROP }); 一切正常,除了图标在运行动画前弹出一秒钟。还有其他人遇到过这个问题吗?我也遇到过同样的问题,我发

我有以下代码向地图添加标记:

var marker = new google.maps.Marker({
    icon: '/pin.png',
    map: map,
    position: latlng,
    draggable: false,
    title: trip_name,
    animation: google.maps.Animation.DROP
});

一切正常,除了图标在运行动画前弹出一秒钟。还有其他人遇到过这个问题吗?

我也遇到过同样的问题,我发现进一步定义自定义图标有助于解决这个问题

var image = {
    url: 'images/map_marker.png',
    // This marker is 20 pixels wide by 30 pixels tall.
    size: new google.maps.Size(20, 30),
    // The origin for this image is 0,0.
    origin: new google.maps.Point(0,0),
    // The anchor for this image is the base of the image at 0,30.
    anchor: new google.maps.Point(10, 30)
};

var marker = new google.maps.Marker({
   icon: image,
   map: map,
   position: latlng,
   draggable: false,
   title: trip_name,
   animation: google.maps.Animation.DROP
});

如果在定义标记时排除贴图参数,然后再设置贴图,会发生什么情况?换句话说,设置marker map参数的延迟是否解决了问题?您使用的是哪个版本的google maps?根据changelog,这个问题在v3.7中得到了修复(我之前已经观察到了,但在3.7发布之前已经很久了)。原始错误描述-更改日志-