Print Copyright info text directly into OpenLayers canvas
<p>I need to add some copyright info text to my openlayers map. The site offers a button to export the map to PNG in a similar way like shown in <a href="http://openlayers.org/en/latest/examples/export-map.html" rel="nofollow noreferrer">http://openlayers.org/en/latest/examples/export-map.html</a> So, the Copyright text must be on on the exported PNG map, too.</p>

<p>Hence, I cannot use a html overlay for the Copyright text but must print the text directly into the canvas, because the "Exported the map to PNG" stuff works with exporting only what's in the canvas (no html controls, or html overlays).</p>

<p>I tried two approaches. Both don't work ;)</p>

<ol>
<li><p>Using <strong>ol.source.ImageCanvas</strong> as shown in this <a href="https://jsfiddle.net/nachtigall/uaxevrcy/3/" rel="nofollow noreferrer">jsfiddle</a>. The problem is that when Zooming in or out, then the text is <em>jumping</em>. But the text should just be static.</p></li>
<li><p>By getting the OpenLayers canvas after OpenLayers has initialised and then <strong>using</strong> this canvas <strong>directly</strong>.</p></li>
</ol>

<p>Here's the code for the 2nd approach that is run <em>after</em> OpenLayers has done its initilisation:</p>

<pre><code>var canvas = document.getElementById('canvas');
var context = canvas.getContext('2d');
context.fillText('© My Copyright Text'), 500, 600);
</code></pre>

<p>This prints just nothing at all and I have no clue why. Is there anything special when "writing" to the openlayers canvas?</p>

<p>So what would be the best approach for adding some simple text to the map canvas?</p>