The
Map.saveSnapshot function saves the currently displayed map as an image. The image is specified by the string expression
filename and must have an extension associated with either JPEG or PNG formats. The map must be currently displayed when this function is called, so it must be executed via a callback function association with a
marker or
button.
The function returns a logical value of 1 (true) if the map snapshot image was successfully saved and 0 (false) otherwise.