First, open Photoshop, go to imageready, open the dynamic diagram, then turn back to Photoshop, open the basemap, select the bottom layer of the dynamic diagram, drag the basemap in, put it on the bottom layer, and keep it visible (don't move other layers), then go to imageready and save the optimization result as gif.