Google地图 - 创建标记并使其消失 [英] Google Maps - create marker and make it fade away
本文介绍了Google地图 - 创建标记并使其消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个标记,然后在大约5秒的时间内消失。关于如何做到这一点的任何建议?
I'd like to create a marker and then have it fade away over the course of about 5 seconds. Any suggestions on how I could do this?
推荐答案
没有直接的原因为什么要使用API,尽管有可能有几种方法可以做到这一点。一个,你可以制作一堆不同的不透明度的图像,并在5秒内为这个标记设置一堆图标。二,你可以使用矢量叠加(例如多边形),它有不透明选项,而不是标记。
There is no direct why to do this with the API, though there a probably a few ways you do something like it. One, you could make a bunch of images with varying opacity and set the icon for the marker a bunch of times within the 5 seconds. Two, you could use the vector overlays (e.g. polygon), which have the opacity options, instead of markers.
这篇关于Google地图 - 创建标记并使其消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文