# NOT RUN {
# The URL below has been chunked to comply with CRAN
# requirements; the use of file.path is optional and not required
# for this component.
if (interactive()) {
library(dash)
app$layout(
htmlDiv(list(
htmlImg(src = file.path('https://upload.wikimedia.org',
'wikipedia/commons/0/0c',
'PIA17351-ApparentSizes-MarsDeimosPhobos-EarthMoon.jpg',
fsep = '/'),
useMap = '#image-map'),
htmlMapEl(list(
htmlArea(target='_blank',
alt='Deimos',
title='Deimos',
href='https://en.wikipedia.org/wiki/Deimos_(moon)',
coords='5,114,32,147',
shape='rect'),
htmlArea(target='_blank',
alt='Phobos',
title='Phobos',
href='https://en.wikipedia.org/wiki/Phobos_(moon)',
coords='113,196,32,103',
shape='rect'),
htmlArea(target='_blank',
alt='Moon',
title='Moon',
href='https://en.wikipedia.org/wiki/Moon',
coords='127,285,294,1',
shape='rect')
),
name = 'image-map'
),
htmlDiv(children = 'Click on the image to visit a Wikipedia article',
id = 'object-name')
)
)
)
app$run_server()
}
# }
Run the code above in your browser using DataLab