Getting error "Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported." RRS feed

  • Question

  • Hello,

    We tried to implement one of the Bing Maps feature called 'Map Image Generator', when map type is transfer from Birds Eye View to Aerial View and then we immediately executed functionality 'Map Image Generator' module, it gets error "Failed to execute 'toDataURL' on 'HTMLCanvasElement': Tainted canvases may not be exported." We attach debugged screenshot as follows


    Saturday, May 19, 2018 10:16 AM

All replies

  • To verify, have you read and ensured that your app isn't doing any of the things that this module doesn't support as noted on the code sample page?

    Pushpin images must be hosted locally, or be dataUri's. Bing Maps terms of use does not allow Ordnance Survey or Birdseye imagery to be "printed". Streetside imagery is not supported.

    Known Limitations:
    • TileLayer's and Pushpin images must either be hosted on the same domain as the website or have CORs enabled on their hosting server.
    • SVG pushpins currently not supported in IE11.
    • The following elements are not rendered; navigation controls, scale bars, Infoboxes, AnimatedTileLayers, and most Custom Overlays.
    • IE and Edge will not cache tiles when CORS is enabled.
    • Chrome throws errors when this property is set enabled and custom tile layers don’t have CORS enabled on the server.

    [Blog] [twitter] [LinkedIn]

    Wednesday, May 23, 2018 4:31 PM