[GIS] OpenLayers export map control not working

exportgeoserveropenlayers-2

I'm trying to save the map as an image and I edited my code according to this example. When I test my site on Chrome the map does not render at all. Chrome's console says:

"Uncaught TypeError: undefined is not a function" for this line of code
exportMapControl = new OpenLayers.Control.ExportMap();

and

"Uncaught ReferenceError: exportMap is not defined" for this line
 <input type="button" value="Export Map" onClick="exportMap()" /> <br />

I use OpenLayers 2.12, GeoServer, PostGIS. The system is on my laptop. I don't use a proxy, I just edited the Apache's conf file (works fine).

I checked this and there is nowhere an export map control.

If you want to see my code, please let me know.

Also, another question, how to edit the above example to make it work with WMS, WFS, and Google layer?

Best Answer

ExportMap() was only a prototype feature demonstrating support for HTML5, which won't be implemented until v3 comes out.

The above example was referenced on this page, part of a "Future Features" writeup.