1

I have been working through the tutorials on pyviz.org. specifically the dashboard one

If I setup the example here: http://pyviz.org/tutorial/A2_Dashboard_Workflow.html

The save icon in the bokeh plot appears to be disabled. If I click area zoom, wheel zoom,or the reset icon they behave as expected. But the save button does nothing.

Is this intentional, able to be reset, or a bug on my side?

Ben

BMichell
  • 3,581
  • 5
  • 23
  • 31

1 Answers1

2

This is a fundamental limitation of browsers, the issue is that the map tiles in the background are making cross-origin requests to download the tiles. Browsers consider this a security issue and therefore mark the canvas as tainted. If you look at the browser console you'll see this error message when hitting save:

Uncaught DOMException: Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported.

In recent versions of GeoViews we therefore automatically disable the save tool if a tile source is present, but the website was built using an older version.

TL;DR: It's a browser security issue and cannot be resolved afaik.

philippjfr
  • 3,997
  • 14
  • 15
  • But note that you can remove the map layer and you'll get the save tool back; you just can't save it with cross-origin content included. – James A. Bednar Jan 24 '19 at 05:11