I'm using an XYZElevationLayer as elevation source and I get gaps like that between two tiles:
If I look straight down, I have no gaps. If I look more horizontally, I do have a gap where the terrain goes up. So the gap is not in X/Y, but in Z. It's like the terrain is not contiguous between the tiles.
Any idea if there are options I should set on the Map to avoid that?
You are saying the last column of tile x/y should be equal to the first column of tile x+1/y? I don't think it should. Elevations are the same as images, the tiles don't have common areas between them. The value of the pixel is at the center of it; not at one corner. So it's normal not to have repeated values between tiles.
Here is an illustration of two 3x1 tiles (H is for the border between the two tiles)
Unfortunately there is no actual standard for elevation raster data, and thus no real "normal" configuration.
osgEarth works best with elevation data tiles that are sized to a power-of-2-plus 1 (e.g. 129 or 257) with the edges repeated across tiles. That is because in order to create triangles that join at the tile boundary, and to create valid normal maps, one needs to know the values in the neighboring tile. The most efficient thing to do it to store those neighboring values in each tile.
To support non-overlapping elevation grids would require a new feature that reads in multiple tiles and converts then to an edge-matched tile.