I am trying to make a export control to export the map as image file. I found this example: http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html so i added the control to the map and the function
function exportMap() {
var canvas = OpenLayers.Util.getElement("exportedImage");
exportMapControl.trigger(canvas);
}
I also added the ExportMap.js file:
http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/lib/OpenLayers/Control/ExportMap.js
but, i am getting this error, when i am trying to run exportMap():
Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided. ExportMap.js:128
What that mean? how can i fix it?