html gif rotate,javascript - rotate a .gif image on google maps api v3? - Stack Overflow

I find lots of answers on this question but not one that works when using .gif images and not markers. To use .gif images (and also animated gifs) I use code (which works)

var image = {

url: 'img/RedFlashYacht.gif',

size: new google.maps.Size(75, 75),

origin: new google.maps.Point(0, 0),

anchor: new google.maps.Point(0, 32),

scaledSize: new google.maps.Size(50, 50)

};

marker = new google.maps.Marker({

position: pos ,

map: map,

icon: image,

store_id: mkrID,

optimized: false

});

//for anyone who has not used .gif, the line 'optimized: false' is critical

What I want to do now is rotate the gif image (to a specified angle, not a constant rotate [that I can do as animated gif]). Dispite setting the ID for the image with 'store_id: mkrID,' var mkrID being previously created, and I can read it back with code marker.get('store_id') so I know it's been set. I cannot access the image with document.getElementById. nor can I get any of the google maps API rotate eample code to work either. Examples I find seem to be for v2 or relate to google maps own markers, not custom images using a gif.

Has anyone been able to rotate a gif image in a google map?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值