The way to create a fv with map of JSON format

[Example 1] Map data in JSON format : Same levels case

../_images/api_json_mapdata01.png
map_data=
[
  [
    { "id":"31", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"26", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"20", "lev":"1", "rx":"0", "ry":"0" }
  ],
  [
    { "id":"11", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"25", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"23", "lev":"1", "rx":"0", "ry":"0" }
  ]
]

[Example 2] Map data in JSON format : Different levels case

../_images/api_json_mapdata02.png
map_data=
[
  [
    { "id":"31", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"26", "lev":"2", "rx":"0", "ry":"0" },
    { "id":"26", "lev":"2", "rx":"1", "ry":"0" }
  ],
  [
    { "id":"20", "lev":"1", "rx":"0", "ry":"0" },
    { "id":"26", "lev":"2", "rx":"0", "ry":"0" },
    { "id":"26", "lev":"2", "rx":"1", "ry":"0" }
  ],
]

For the way to create a fv with map, it will cause an error if the tile is not enough to the size of the fv.

[Example 3] Map data in JSON : Tag

../_images/api_json_mapdata03.png

When id 2 and id 5 are associated with green tag and id 9 is associated with yellow.

map_data=
[
  [
    {"search":{"keyword":"testx","default":{ "id":"3", "lev":"1", "rx":"0", "ry":"0"}}},
    {"id":"79", "lev":"1", "rx":"0", "ry":"0"},
    {"search":{"keyword":"yellow"}}
  ],
  [
    {"search":{"keyword":"green","default":{"id":"99", "lev":"1", "rx":"0", "ry":"0"}}},
    {"search":{"keyword":"green","default":{"id":"78", "lev":"1", "rx":"0", "ry":"0"}}},
    {"search":{"keyword":"yellow"}}
  ]
]

when you generate a fv by using the above map

For the first column and the first row, testx tag does not exist, thus default tile id 3 is set.
For second column and the first row, becuase the id 79 is specified, id 79 is shown.
For third column and the first row, becuase the yello tag is specified, id 9 is shown.
The green tag is specified on the first and second row in second column, thus id 5 is displayed in first row and id 2 is displayed in second row. (The media will be displayed with newest order.)
Because the third column and the second row, the yellow tag is specified, but there is not any id for the tag. Thus the black media is set.

[Example 4] Map data in JSON : using Timeline

If there are 100 medias (media id 1 - 100 exists)

map_data=
[
  [
    {"id":"1", "lev":"1", "rx":"0", "ry":"0"},
    {"timeline":"true"}
  ],
  [
    { "id":"2", "lev":"1", "rx":"0", "ry":"0"},
    {"timeline":"true"}
  ]
]
For the above map, the larger number of media id is newest.
Thus the fv is generated as below.
../_images/api_json_mapdata04.png

[Example 5] Map data in JSON format : For using start position

When considering time position and duration with map, you can set the following JSON format.
{ “id”:”300”, “lev”:”1”, “rx”:”0”, “ry”:”0”, “st”:”6”,”dur”:”6”}
The st is the start time position of the media.
The dur is the playing time duration from the start time position of the media.
map_data=
[
  [
    { "id":"1", "lev":"1", "rx":"0", "ry":"0"},
    { "id":"2", "lev":"1", "rx":"0", "ry":"0", "st":"6","dur":"4"}
  ],
  [
    { "id":"3", "lev":"1", "rx":"0", "ry":"0", "st":"6","dur":"6"},
    { "id":"4", "lev":"1", "rx":"0", "ry":"0", "st":"6","dur":"8"}
  ]
]

For above example, “st” and “dur” is not set for id 1, thus start time position is set to 0, time duration is set to original media duration. Because id 2 has “st” and “dur”, this media is played from 6 seconds point to 10 seconds point (for 4 seconds).

And, the media id 3 and id 4 is played from 6 seconds point for each 6 and 8 seconds.

If the time duration of fv is longer than the dur, the media is played repeatedly from the “st” time position for “dur” time duration.