
jsearch.makeHeatmap( configuration as object ) as GeospatialBucketDefinition
Returns a list of bounds for grouping geospatial points
as a heatmap by subdividing a geospatial box with latitude and longitude
divisions as input for the ValuesSearch.groupInto
or FacetDefinition.groupInto method.
| Parameters | |
|---|---|
| configuration | The options for generating the geospatial heatmap. |
northeastsouthwest- The latitude and longitude bounds for the box.
lonDivs- The number of longitude buckets between east and west.
latDivs- The number of latitude buckets between south and north.
// Define a heat map that roughly corresponds to the continental United
// states, divided into a set of 20 boxes (5 latitude divisions and
// 4 longitude divisions).
const jsearch = require('/MarkLogic/jsearch.sjs');
jsearch.values('incidents')
.groupInto(makeHeatMap({
north: 49.0,
east: -67.0,
south: 24.0,
west: -125.0,
lonDivs: 4,
latDivs: 5
}))
.result()
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.