Class: Print

ol.control. Print


new Print( [options])

Print control to get an image of the map

Parameters:
Name Type Argument Description
options Object <optional>

Control options.

Properties
Name Type Description
className String

class of the control

imageType string

A string indicating the image format, default image/jpeg

quality number

Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp

orientation string

Page orientation (landscape/portrait), default guest the best one

Extends

Methods


print(cback, options)

Print the map

Parameters:
Name Type Description
cback function

a callback function that take a string containing the requested data URI.

options Object
Properties
Name Type Description
imageType string

A string indicating the image format, default the control one

quality number

Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp

immediate boolean

true to prevent delay for printing

any *

any options passed to the print event when fired