opengeospatial / ideas

Public repository for Innovation Program Ideas
20 stars 3 forks source link

Define declarative animated map markup in MapML #18

Open prushforth opened 7 years ago

prushforth commented 7 years ago

MapML allows us to define tiles, images and vectors. It should provide a declarative facility enabling simple animated map layers. An example of an animated map. What we would like is a simple markup which declares a set of layers to be animated, together with some parameters for that animation (timing, opacity etc.) Perhaps there would be a good way to define those properties in CSS?

The objective would be, for any given zoom, extent and projection, define a set of layers to be animated.

Maybe something akin to this:

<animate interval="100" loop> `&lt;layer src="foo1&amp;zoom=7&amp;xmin=..."&gt;&lt;/layer&gt; &lt;layer src="foo2&amp;zoom=7&amp;xmin=..."&gt;&lt;/layer&gt; `<layer src="foo3&zoom=7&xmin=..."></layer> </animate>

prushforth commented 7 years ago

It might be more generic to enable a layer group element, and then allow attributes, or even css selectors/rules to animate them, if animation is required:
<layers>   <layer src="foo1&zoom=7&xmin=..."></layer>   <layer src="foo2&zoom=7&xmin=..."></layer>   <layer src="foo3&zoom=7&xmin=..."></layer> </layers>

The advantage would be that <layers> could be used by servers (map authors) to group map resources, without necessarily having control of all of them (power of linking on the Web).

Furthermore, if we adopted <layers> to be a child of the HTML <map> element, the legend control could allow hierarchical control of sub-layers (on/off as a group, as well as potentially animation via CSS by the HTML author.