Html Image Map Plugin

Intro

With this plugin you can write an Image Map from current map. The active polygon or point layer will be used to define the clickable area's in the html. Optional change mapcanvas (image) size to preferred size. The attribute values href, onClick and onMouseOver and onMouseOut are optional in area tags. Instead of writing ALL polygons to area tags, it's also possible to make a selection and just use this selection polygons to generate the area-tags.

How

  • Load your data and symbolize all you layers
  • Make one line or point vector layer the active layer, by selecting it in the legend
  • Activate the plugin
  • Optional: change mapcanvas (image) size to preferred size.
  • Use the browse button to browse to a writable place on you filesystem where the html and png files will be written
  • Select which html/javascript attributes you want to have in the final html
  • Optional: select features, if you want only those features to be clickable (defaults to all features in window)
  • For the selected attributes, select the layer attributes you want to use

    Main dialog
    Dialog of Html Image Map Plugin

    After pushing OK, the plugin will:

  • write an screendump of current mapwindow as [name].png
  • write an html file with some basic javascript and html for an image map:
    <area shape="poly" href="CROATIA" onClick="mapOnClick('CROATIA')" onMouseOver="mapOnMouseOver('ZAGREB')"
                         coords="306,135,307,135,308,135,309,135,310,136,309,136,308,136,308,135,306,135"> 

    REMARK: version 0.4 and higher can handle layers which 'On The Fly Projection' enabled. BUT it can handle this only if your QGIS version is 1.5 or above. As a workaround you can save the layer with 'On The Fly Projected' as a shape in your destination src, load the shape (which is now in the right projection) and use that vector layer for the imagemap.

    Version history

    Tips, comments, questions:
    richard at-sign duif.net (Richard Duivenvoorde)