City-of-Helsinki / wagtail-svgmap

ImageMap functionality for Wagtail through inline SVGs
BSD 3-Clause "New" or "Revised" License
13 stars 8 forks source link

How to render the image map ? #16

Open stuaxo opened 6 years ago

stuaxo commented 6 years ago

I've got an image map, that is a literal map of parts of the UK.

I've set different parts of the map to have named ids using inkscape, how can I actually output the svg in the template ?

I have an image map template variable called 'map', I tried - {{ self.map.map }}

Is there a template filter I can use to output the svg inline ?

stuaxo commented 6 years ago

I didn't realise that I needed the .rendered_svg method on the block. This should probably be documented, I wonder if it should be default.

Though maybe something like wagtails {% image %} could be useful to get more control.