Skip to content
This repository has been archived by the owner on Sep 16, 2019. It is now read-only.

Latest commit

 

History

History
41 lines (33 loc) · 1.55 KB

README.md

File metadata and controls

41 lines (33 loc) · 1.55 KB

Animated JavaScript Heatmap on OpenStreetMap

This code is a fork of NYTCommentsMap by Alastair Coote!

Used software

JavaScript libraries

Getting started

  • Open the mapdisplay.js and modify the parameters in the function ´MapDisplay´
  • Create the file data/sampleData.js and insert your data:
var sampleData = { ... , "data":
[
    {"date":1306188000, "points":
        [
            {"lat":32.0,"lon":-16.5,"val":0.00056},
            {"lat":36.0,"lon":-14.5,"val":0.02756},
            ...
        ]
    },
    {"date":1306191600, "points":
        [
            {"lat":33.0,"lon":-17.5,"val":0.00236},
            {"lat":37.0,"lon":-15.5,"val":0.03156},
            ...
        ]
    },
    ...
]};

(The data array contains entries, which have a timestamp in seconds as date and an array named points. This neasted array contains all points for the spefic date and each entry has a location (latitude lat and longitude lon) and a value val.)