在谷歌地图V3中显示.gif图片标记 [英] Display .gif image marker in google maps V3

查看:586
本文介绍了在谷歌地图V3中显示.gif图片标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Google Maps V2支持所有gif图片标记在地图中显示。现在我从V2迁移到gwt-maps-3.8.0,其中.gif标记显示为常量标记。我发现了一些类似的问题,但我没有得到确切的东西,我正在寻找。

Google Maps V2 supported all gif image markers to display in map. Now I'm migrating from V2 to gwt-maps-3.8.0 where .gif markers are displaying as constant markers. I found some similar questions but I didnt got exact thing which i'm looking for.

 String iconName = "Fire.gif";
 MarkerOptions markerOptions = MarkerOptions.create();
 markerOptions.setDraggable(true);
 MarkerImage image = MarkerImage.create(iconName);
 Marker marker = Marker.create(markerOptions);
 marker.setPosition(LatLng.create(30.440099, 36.843498));
 marker.setMap(map);`

注意:我需要Google地图的GWT代码V3。感谢您的帮助...

Note: I need GWT code for Google Maps V3. Appreciate your help...

推荐答案

若要使用动画.gif图像,请参阅此文章 gif标记谷歌地图

To use animated .gif images, see this post .gif marker google maps

我不知道GWT,但这应该与 Google Maps API v3 一起使用

I don't know GWT, but this should work with the Google Maps API v3

marker.setOptions({optimized: false});

这篇关于在谷歌地图V3中显示.gif图片标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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