Large matrix JSON Example
We should be able to deal with any size of distance matrix. The matrix could be composed of images or from the values.
Based on this information we should be able to:
- To zoom in / out
- To generate an event based on the position of the mouse
- To move the image
In this example we have setup different folder corresponding to different zoom factor. For example in the example complex we have 5 different zoom level.
In each folder there is a json folder and a png folder. We have here 2 possibilities:
- We use the toc.json and all the cited json to create from scratch the image
- We use the tocimg.json and all the png to generate the image
In the toc.json document we have some important fields:
- type: matrix
- zoomIn: which matrix should we consider when we zoom in. Will point in reality in this case to another toc.json from another folder.
- zoomOut: which matrix should we consider whe we zoom out.
- value: either an array of array of value or an array or array of matrix object (a "tile" which is here an array of array of integer).
In the document tocimg.json is used the following fields are defined:
- type: matrix
- zoomIn: which matrix should we consider when we zoom in. Will point in reality in this case to another toc.json from another folder.
- zoomOut: which matrix should we consider whe we zoom out.
- value: an array of array of object of type image that contains the "tiles".
What could be improved or add as field that would allow to have an infinite size map:
- xFullSize: the X size of the full map
- yFullSize: the Y size of the full map
- x: the topLeft x coordinate in the full map
- y: the topLeft y coordinate in the full map
- n, ne, e, se, s, sw, w, nw: the neighbour tiles
- zoomIn, zoomOut: have the zoomIn and zoomOut for each tile that would allow to zoom in/out to the center of any tile