Notifications
Announcements
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 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".
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268