MapExport.h header
#include <ew/app/MapExport.h>
Namespace ew::app
Functions
QString ew::app::regionImageMapHtml(const ew::core::Map &map, int imageWidth, int imageHeight)
Renders a map as an HTML fragment with clickable region overlays: an referencing the base image plus an image <map> whose <area> polygons trace the map's regions. Each area's coordinates are the region's normalized points scaled to imageWidth x imageHeight pixels; its link points to the region's linked sub-map page, else its linked entity page (both as "<id>.html"), and its title/alt is the region label. Regions with fewer than three points are skipped. A visible <ul class="map-regions"> of the same labelled links follows the image map, giving the page a keyboard/screen-reader-navigable text alternative (image maps are otherwise inaccessible) and making the region labels searchable visible text. This is how a project's maps become navigable pages in the exported website.