In contrast to the Carousel with GM API , the carousel does not work with the OSM API.

Jürgen Berkemeier gave me the tip to start the page with the parameter autoload=false for the GPXViewer. With JB.GPX2GM.start(); the GPXViewer can then be started on the Javascript console. If you add the parameter debuginfo to the page view, you get a lot of information on the Javascript console.

It has been shown that a mapdiv is created for the first map (318*298) and the map is displayed. With the three other maps only a gray field and the message "... Map map4360: Mapdiv angelegt 0*0 (GPX2GM.js, line 1322)“. The 0*0 shows that the map div has no size yet. Jürgen's assumption was that it is a timing problem: the GPXviewer which is started at "DomContendLoaded" finds the div earlier than the intended size has been assigned to it.

I have now checked again in the documentation for bootstrap and found the following solution.

$('#carousel-4720').on('slid.bs.carousel', function () {
  JB.GPX2GM.start();
})

This means that the GPXViewer is re-initialized every time the carousel changes. However, this has the disadvantage that GPXViewer always wants to recreate ALL maps, which of course leads to errors. In addition, this leads to a memory error after a while.

The remedy might be to let GPXViewer only start the current map. How do I do that?