Skip to content

Feature/ec 101 make interactive

Christopher Johnson requested to merge feature/EC-101-make-interactive into master

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.

image Notice that when the cursor is outside the region which contains data, there is no pixel highlighting.

image 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.

image image

@rjsc @mw @smw @jcoop

Merge request reports

Loading