Description
Since <map>
is already a shared primitive of the Web Platform, albeit neglected and accumulating technical debt with each passing year, we should prototype the following basic progressive enhancement / graceful degradation scenario, in which the shared primitives <img>
<map>
and <area>
are progressively enhanced into a pannable, zoomable georeferenced resource:
<img usemap="#themap" src="https://example.org/world-map-image.jpg" alt="A picture of a zoomable, pannable world map image">
<map name="themap" projection="OSMTILE" lat="0" lon="0" zoom="0" is="web-map">
<area href="https://www.openstreetmap.org/">
</map>
In this scenario, although the only 'layers' are the <img>
and the <area>
, we should make it so that the image is pannable and zoomable, perhaps by converting it dynamically to a <layer->
, as we do with <area>
.
In a (future) native element, it would be the presence of the projection
, lat
, lon
and zoom
attributes that trigger this behaviour, since without those attributes, it is just a plain non-responsive / progressive client side image map.