Heatmaps with overlayed markers

How do I overlay markers on a heatmap using the R interface? I tried adding add_trace with type = “scatter” and mode=“marker” after ploting the heatmap, and it works, but I get a warning saying that “markers do not have an attribute z” (along these lines). Am I missing something?