Class Map


@Bean(typeName="map") public class Map extends HtmlElementContainer
DTO for an HTML <map> element.

The map element defines an image map, which is an image with clickable areas. It contains area elements that define the clickable regions within the image. The map element is referenced by img elements using the usemap attribute to create interactive images.

Examples:

import static org.apache.juneau.bean.html5.HtmlBuilder.*; // Simple image map with rectangular areas Map map1 = map("navigation", area("rect", "0,0,100,50", "https://example.com/home"), area("rect", "100,0,200,50", "https://example.com/about"), area("rect", "200,0,300,50", "https://example.com/contact") ); // Image map with different area shapes Map map2 = map("shapes", area("circle", "150,75,50", "https://example.com/circle"), area("poly", "0,0,100,0,50,100", "https://example.com/triangle"), area("default", null, "https://example.com/default") ); // Image map with accessibility Map map3 = map("accessible", area("rect", "0,0,100,100", "https://example.com/region1") .alt("Click here for region 1"), area("rect", "100,0,200,100", "https://example.com/region2") .alt("Click here for region 2") );

See Also: