Kartografická vizualizace II

SVG canvas

  • the space where the SVG content is drawn
  • infinite, rendered on finite viewport though
  • SVG lying beyond the viewport boundaries is clipped off

SVG viewport

  • viewing area where the SVG will be visible
  • kind of a window
  • similar to a browser viewport
<!-- viewport will be 800 px wide and 600 px high -->
<svg width="800" height="600">

</svg>
  • viewport coordinate system
    • origin at the top left corner [0,0] - similar to CSS box model
  • user coordinate system
    • established on the SVG canvas, identical to viewport CRS
    • can be modified using viewBox attribute

SVG viewBox

SVG animations

  • they're real fun
  • SMIL
  • CSS
  • JavaScript

SVG SMIL animations

  • synchronized multimedia integration language
  • never supported in IE/Edge
  • deprecated in Chrome since v 45
  • animates the numeric attributes (you tell me)
  • animates transform attributes
  • animates color attributes
  • follows a motion path
  • http://embed.plnkr.co/EPqAPZRTkshodLuzTuRa/

SVG CSS animations

SVG JavaScript animations

  • most powerful
  • DOM usage

Let's produce simple SVG with QGIS x Kartograph

Let's do some basic animations on top of that SVG

Kartografická vizualizace II: SVG coordinate systems and transformations

By Michal Zimmermann

Kartografická vizualizace II: SVG coordinate systems and transformations

  • 1,289