Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnapShot can suggest to the user to skip CrossOrigin #1267

Closed
offtherailz opened this issue Nov 11, 2016 · 1 comment
Closed

SnapShot can suggest to the user to skip CrossOrigin #1267

offtherailz opened this issue Nov 11, 2016 · 1 comment

Comments

@offtherailz
Copy link
Member

When the snapshot contains images that require cross origin, the snapshot generation becomes complicated. But the preview is generated at full resolution and with the correct tiles. This can not be used via javascript because of security limitations (the canvas is tainted, see this: https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image)

But there is a trick. The user can right-click on the preview and click "Save Image as". So we can see if the canvas is tainted, and if it is, suggest the user to do the trick. "The Save functionality is limited because of security limitations, for better result please right click on the Preview and select "Save Image as..."

@offtherailz
Copy link
Member Author

Something like this:
image

offtherailz added a commit to offtherailz/MapStore2 that referenced this issue Nov 15, 2016
 - Fix geosolutions-it#1267. Now if the canvas is tainted, a warning suggest the user how to have a better result
 - Removed glitch when leaflet try to save snapshot (a box was appearing in top-right corner)
 - Simplified the snapshot creation procedure (triggers)
 - Error management in case of tainted canvas in the save mode (see geosolutions-it#1269)
 - Various Fixes with wrong sizes of snapshot
 - Now leaflet snapshot support resized map when the drawer menu do not overlap
 - Increased test coverage
@offtherailz offtherailz self-assigned this Nov 15, 2016
offtherailz added a commit that referenced this issue Nov 15, 2016
- Fix #1267. Now if the canvas is tainted, a warning suggest the user how to have a better result
 - Removed glitch when leaflet try to save snapshot (a box was appearing in top-right corner)
 - Simplified the snapshot creation procedure (triggers)
 - Error management in case of tainted canvas in the save mode (see #1269)
 - Various Fixes with wrong sizes of snapshot
 - Now leaflet snapshot support resized map when the drawer menu do not overlap
 - Increased test coverage
@ghost ghost removed the pending review label Nov 15, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant