Skip to content

AltImage via set/highlight/select triggers exception #316

@techfg

Description

@techfg

When trying to establish an exception similar to the following occurs:

graphics.js:215 Uncaught TypeError: Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The provided value is not of type '(CSSImageValue or HTMLImageElement or SVGImageElement or HTMLVideoElement or HTMLCanvasElement or ImageBitmap or OffscreenCanvas)'
    at m.Graphics.addAltImage (graphics.js:215)
    at m.Graphics.<anonymous> (graphics.js:438)
    at Object.<anonymous> (graphics.js:253)
    at Function.each (jquery.1.7.2.min.js:2)
    at m.Graphics.render (graphics.js:249)
    at m.Graphics.addShapeGroup (graphics.js:156)
    at m.AreaData.highlight (areadata.js:248)
    at HTMLAreaElement.mouseover (mapdata.js:162)
    at HTMLAreaElement.me.mouseover (mapdata.js:359)
    at HTMLAreaElement.dispatch (jquery.1.7.2.min.js:3)

It appears this issue was introduced in this commit with the root cause being Line 1034.

Steps to reproduce:

  1. Clone repo
  2. Open /examples/altimages.js
  3. Hover over Texas
    OR
  4. Click "click to bind az with altimage2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions