Files
MapLibreParticleLab/platform/android/docs/styling/animated-image-source.md

1.0 KiB

Animated Image Source

{{ activity_source_note("AnimatedImageSourceActivity.kt") }}

In this example we will see how we can animate an image source. This is the MapLibre Native equivalent of this MapLibre GL JS example.

{{ openmaptiles_caption() }}

We set up an image source in a particular quad. Then we kick of a runnable that periodically updates the image source.

--8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/style/AnimatedImageSourceActivity.kt:onMapReady"
--8<-- "MapLibreAndroidTestApp/src/main/java/org/maplibre/android/testapp/activity/style/AnimatedImageSourceActivity.kt:setImage"