MarkLogic Server 11.0 Product Documentation
jsearch.makeHeatmap

jsearch.makeHeatmap(
   configuration as object
) as GeospatialBucketDefinition

Summary

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.

Usage Notes

The configuration options specify the following required parameters:
north
east
south
west
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.

See Also

Example


// 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()
   
Powered by MarkLogic Server | Terms of Use | Privacy Policy