Feature/ec 101 make interactive
Making the Map more interactive
In an effort to create highlighting of a square, I have extracted the logic which loads and processes an EdgeImage
from the server into a backbone collection. This collection is now responsible for obtaining the image, and splitting it up into its EdgeFrames
(one for each time step). From this, I have re-purposed the EdgeLayer
to work from the new collection.
By having the image processed into a model, it becomes quite easy to obtain the underlying numerical value for a given EdgeImage pixel (these are offset as required for visualisation). This is important for the EdgeHighlightLayer
which uses the presence of a value in a pixel as a toggle for the pixel selection.
Notice that when the cursor is outside the region which contains data, there is no pixel highlighting.
And when the mouse is over data, the pixel is highlighted blue
A standard L.Marker
layers is used to add a flag for the currently selected square.