Class nokia.maps.heatmap.Overlay
Class Summary
This class creates tiles to visualize value-based or density-based heat maps.
new nokia.maps.heatmap.Overlay
([options])
Colors
The colors displayed in the heat map can be customized by providing an object that conforms the interface nokia.maps.heatmap.Overlay.Colors.
DataPoint
This interface represents a single data point that can be visualized in a heat map.
Options
This interface defines options that can be passed to the nokia.maps.heatmap.Overlay constructor.
Method Summary
addData
(data)
This method adds an array of nokia.maps.heatmap.Overlay.DataPoints to the given heat map.
clear
()
This method removes all data from the given heat map provider.
Field Summary
Boolean
assumeValues
Optional
This property holds a boolean value defining whether to paint assumed values in regions where no data is available.
Number
coarseness
Optional
This property holds a numeric value defining the resolution reduction when producing tiles.
nokia.maps.heatmap.Overlay.Colors
colors
Optional
This property holds an object that conforms to the interface nokia.maps.heatmap.Overlay.Colors and is used to define the colors of the heat map.
String
description
This property holds a description of the provider to be used in the user interface, for example in tool tips.
String
description
Optional
This property holds a description of the provider to be used in the user interface, for example in tool tips.
Number
id
The ID of the Provider instance
String
label
Optional
This property will represent a label for the provider, for example for the type or overlay buttons.
String
label
This property represents a label for the provider, for example for the type or overlay buttons.
Number
max
This property indicates the maximum zoom level.
Number
max
This property indicates the maximum zoom level.
Number
min
This property indicates the minimum zoom level.
Number
sampleDepth
Optional
This property holds a numeric value defining the number of sampling iterations the heat map renderer will perform on the data set.
Direct Inheritance
Inherited from nokia.maps.heatmap.Overlay.Options:
assumeValues
coarseness
colors
opacity
sampleDepth
type
Indirect Inheritance
Constructor Detail
This method creates an empty heat map overlay.
new nokia.maps.heatmap.Overlay([options])
Parameters:
| {nokia.maps.heatmap.Overlay.Options} | [options] | An object specifying settings for the new heat map overlay instance |
Method Detail
addData
(data)
This method adds an array of nokia.maps.heatmap.Overlay.DataPoints to the given heat map.
The heat map provides a visual representation of these data.
Note that there is a significant performance cost to adding and removing data, once an overlay has been created. This is related to the rendering engine and tile caching. If you wish to add data after tiles have been created, the cache must be cleared and all tiles need to be recreated. For this reason, heat maps should not be used used to create fast animations.
Examples:
// Create a density heat map overlay:
var myHeatMapOverlay = new nokia.maps.heatmap.Overlay();
// Add DataPoints:
myHeatMapOverlay.addData([
{latitude: 50, longitude: 13},
{latitude: 50, longitude: 13.1},
{latitude: 51, longitude: 13.2},
{latitude: 49.9, longitude: 13.15},
...
{latitude: 50, longitude: 13.4}
]);
// Add the overlay to the map display to make
// the heat map visible:
myDisplay.overlays.add(myHeatMapOverlay);
Parameters:
| {nokia.maps.heatmap.Overlay.DataPoint[]} | data |
clear
()
This method removes all data from the given heat map provider.
New data can be provided using the nokia.maps.heatmap.Overlay#addData method.
