Display .gif image marker in google maps V3

2019-02-28 06:17发布

问题:

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);`

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

回答1:

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

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

marker.setOptions({optimized: false});