This is a plugin of heatmap.js for adding heatmap layer on Longdo Map. For more information on heatmap.js, see:heatmap.js
plugins/longdomap-heatmap/longdomap-heatmap.js
<script src="https://api.longdo.com/map/?key=[Your own key]"></script>
<script src="heatmap.js"></script>
<script src="longdomap-heatmap.js"></script>
var testData = {max: 10,data:[
{lat:60.087195,lon:84.767761,value:8},
{lat:41.804724,lon:-104.021301,value:4},]};
var cfg = {
'radius': 25,
"maxOpacity": .5,
"scaleRadius": true,
"useLocalExtrema": true
};
heatmapLayer = new HeatmapOverlay(cfg);
heatmapLayer.setData(testData);
map.Layers.add(heatmapLayer);
For those who would like to see quickly, here is links to them.
Note: turn off Adblock otherwise you cannot load heatmap.js
For sourcecode,see what is in example/longdomap-heatmap folder
Data points have to be defined in JSON format such as:
var testData = {max: 10,data:[
{lat:60.087195,lon:84.767761,value:8,radius:20},
{lat:41.804724,lon:-104.021301,value:4},]};
'radius' field is optional. The default radius is 2. If scaleRadius in config is true, it will be manipulated.
configurable values are as the same as ones of original heatmap.js. However, you cannot use container option.
- backgroundColor
- gradient
- maxOpacity
- minOpacity
- blur
- radius
- scaleRadius
- useLocalExtrema
- ...
For more information, see: heatmap.js
- pa7/Patrick Wied
- original heatmap.js contributors
- belkey
This plugin is licensed under MIT License. (see: LICENSE file)