Canvas controls are controls drawn on the map canvas so they can be exported to JPEG / PNG images.
-
ol.control.CanvasScaleLine is an ol.control.scaleLine that is drawn on the canevas.
-
ol.control.CanvasAttribution is an ol.control.attribution that is drawn on the canevas.
The setCanvas function toggles beetween standard/canvas attribution
-
ol.control.CanvasTitle draw a title on the map. Use the style option to style the title.
-
ol.control.CenterPosition draw the coordinate of the center of the map.
This example use the ol/control/Print to create an image and export
as image (PNG/JPEG) or as a PDF file
(using eligrey/FileSaver or MrRio/jsPDF lib).