web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Failed to access HTML ...
Power Apps
Unanswered

Failed to access HTML canvas element while exporting image

(0) ShareShare
ReportReport
Posted on by

Hi,

We are developing PCF control for visualization using Bing Map sample code from the link given below:
https://github.com/microsoft/BingMapsV8CodeSamples/blob/master/Samples/Experimental/MapImageGenerator/MapImageGeneratorModule.ts


We successfully load the mapImageGenerator module in our control, but we failed to access the HTML canvas element. We want to export the image like canvas.toDataURL("image/png"). But it gives error like ''Tainted canvases may not be exported.''

 

Does anyone know how to do the same in PCF Control?

I have the same question (0)
  • cchannon Profile Picture
    4,702 Moderator on at

    I don't know. The code on that git is pretty sketchy. I mean, there is a lot of "don't actually use this" disclaimer at the top. I think you might want to look for something else as your example:

    * Warning!!!
    * This is an experimental module. It accesses the maps DOM in an unsupported way and can break at anytime.
    *
    * Known limitations
    * - Does not support navigation controls, scale bars, Infoboxes, AnimatedTileLayers, TileLayers, and most Custom Overlays
    * - CORS required for map tiles and custom pushpin images.
    * - Streetside imagery is not supported.
    * - Bing Maps terms of use does not allow Ordnance Survey or Birdseye imagery to be "printed".

     

  • Hemant Gaur Profile Picture
    on at

    Seems to be security related error,  you can explore if there is a way to get the content in the app and save/print it using the expressions/browser as opposed to direct download. 

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard