If an application is having a problem, I would like to allow the user to create a screen print on a mobile device, like an iPad and then send the image as an attachment using JavaScript. How do you do this?
Solved! Go to Solution.
Typically people use http://html2canvas.hertzen.com/ to do this w/ JavaScript, BUT that doesn't work if your app includes images that came from another domain (i.e. tiles from a map service). You may be able to get around that if you want to run all your image requests through a proxy. Also, I have no idea what the support is like for mobile browsers. The one time tried html2canvas before on dojox/charting charts, they came out funky - so there may also be issues w/ SVG (read: feature layers), which may require you to inline any CSS styles. Because of those issues, I have not bothered trying it on a full page of an app.
I'd be interested to hear if anyone has successfully done this w/ a mapping app.
I'd say you are better off providing your users w/ links to instructions on how to take a screen shot in the various devices you support (like How to take a screenshot on an iPad (any generation) | Digital Trends ) and an e-mail address where they can send it.
Typically people use http://html2canvas.hertzen.com/ to do this w/ JavaScript, BUT that doesn't work if your app includes images that came from another domain (i.e. tiles from a map service). You may be able to get around that if you want to run all your image requests through a proxy. Also, I have no idea what the support is like for mobile browsers. The one time tried html2canvas before on dojox/charting charts, they came out funky - so there may also be issues w/ SVG (read: feature layers), which may require you to inline any CSS styles. Because of those issues, I have not bothered trying it on a full page of an app.
I'd be interested to hear if anyone has successfully done this w/ a mapping app.
I'd say you are better off providing your users w/ links to instructions on how to take a screen shot in the various devices you support (like How to take a screenshot on an iPad (any generation) | Digital Trends ) and an e-mail address where they can send it.
I found this to be a tough topic online. Thanks.