Is it possible to place an animated image on a googlemap element? (e.g. gif)

I have an android app with googlemap view

I need to put an animated icon showing the gps position on the map

I know how to do this with a regular png image, but I want to use something like a GIF image, an animated image

How can i do this?

EDIT:

IT HAS XML ANIMATED: animation.xml

<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
<item android:drawable="@drawable/miniicon" android:duration="200" />
<item android:drawable="@drawable/miniicon2" android:duration="200" />
<item android:drawable="@drawable/star" android:duration="200" />
</animation-list>

this is where i bind the XML animated to drawable

//drawable2 = this.getResources().getDrawable(R.drawable.miniicon2); // Icono del programa, para mi posicion GPS
drawable2 = this.getResources().getDrawable(R.layout.animation); // Icono del programa, para mi posicion GPS
+3
source share
3 answers

Another answer is there is a similar (but old) stackoverflow question:

Series of images (animation) via Google Maps

, , . .

0

animation-list xml , . , .

-1

Surely - OpenGL allows you to overlay 2D images on top of the image, one way to do it. See Does Google Use MapView in Android OpenGL? for a similar question.

-1
source

Source: https://habr.com/ru/post/1777981/


All Articles