I am trying to create an image map with clickable areas with the below given code on an image file dashboard.gif.
I am not sure about my syntax but I get an error when trying to run the code:
AttributeError: ‘module’ object has no attribute ‘Map’
import dash
import dash_html_components as html
app = dash.Dash()
app.layout = html.Div([
html.Img(
html.Map([
html.Area(target='', alt='gerar', title='gerar', href='1', coords='427,136,319,89', shape='rect'),
html.Area(target='', alt='otimizar', title='otimizar', href='2', coords='142,170,34,123', shape='rect'),
html.Area(target='', alt='assegurar', title='assegurar', href='3', coords='283,170,173,120', shape='rect')],
name='image-map'
),
src='images/dashboard.gif',
usemap='#image-map'
)
])
if __name__ == '__main__':
app.run_server()
To me it seems that the Map attribute is not implemented for the html components. If so, any ideas how I could tackle this problem?