I need to export the current OpenLayers view into a canvas to finally save it as a image.
My problem is, that I need an image of the current user view with some interactive elements.
I saw this working example: http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html
There is a little addon that is not OpenLayers standard, but add a little export functionality: http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html
but this does no work on current open layers (2.13) any more and I don't get which version that is.
The Constant OpenLayers.Layer.Grid.ONECANVASPERLAYER
does not exist (any more ?) And the option "useCanvas" is deprecated as well.
This is the broken code (summarized):
if (layer instanceof OpenLayers.Layer.Grid){
this.drawLayer(layer.canvas);
}
A Grid layer has no attribute "canvas" as far as I can see it.