效果和动画与谷歌地图标记 [英] Effects and animations with Google Maps markers

查看:128
本文介绍了效果和动画与谷歌地图标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道如何创建了谷歌地图的标记效果/动画。具体来说,我想放大/退房或变脸标记的给定时间之后。难道是可能的HTML5?是否有任何的jQuery效果库这样做呢?

I would like to know how to create effects / animations over Google Maps markers. Specifically, I would like to zoom-in/out or "fade" a marker after a given amount of time. Could it be possible with HTML5 ? Is there any jquery effect library for doing this?

(我可以使用地图图块服务器来创建地图图块叠加层,并重新生成瓷砖覆盖每一秒,但我想这是非常处理密集型...)

(I could use a map tile server for creating map tile overlays and re-generate tile overlays every second, but I guess it is very processing-intensive...)

在此先感谢

推荐答案

我还没有看到任何图书馆这样做,并没有功能褪色每说标记在API

I haven't seen any library to do this, and there isn't functionality in the API to fade Markers per say.

相反,你所能做的就是通过创建自己的自定义叠加看起来像一个标记。自定义背景画面通常包含一个div,你可以很容易地控制使用基于您自定义的叠加施工期间指定一个类或ID的JavaScript / jQuery的的透明度。

Instead, what you can do is simulate markers by creating your own Custom Overlay that looks like a marker. A custom overlay usually contains a div, which you can easily control the opacity of using JavaScript / jQuery based on a class or id you assign during the custom overlay construction.

举个例子,如果你看的这个页面可以看到是用​​它来打开知名度的一个按钮,你可以很容易地更改JavaScript控制的东西不透明度。

As an example, if you look at this page you can see the is a button used to toggle the visibility, you could just as easily change that JavaScript to control the opacity of something.

这篇关于效果和动画与谷歌地图标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆