Skip to content

Commit

Permalink
Implement queryRadius and queryIntersectsFeature in heatmap layer
Browse files Browse the repository at this point in the history
  • Loading branch information
Asheem Mamoowala committed Nov 3, 2017
1 parent de53c56 commit 514992c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/style/style_layer/heatmap_style_layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,14 @@ class HeatmapStyleLayer extends StyleLayer {
this.heatmapFbo = null;
}
}

queryRadius(): number {
return 0;
}

queryIntersectsFeature(): boolean {
return false;
}
}

module.exports = HeatmapStyleLayer;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"version": 8,
"metadata": {
"test": {
"width": 128,
"height": 128,
"queryGeometry": [
64,
64
]
}
},
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
"sources": {
"source": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"identifier": "firstSource"
},
"geometry": {
"type": "Point",
"coordinates": [
0,
0
]
}
}
]
}
}
},
"layers": [
{
"id": "background",
"type": "background",
"paint": {
"background-color": "white"
}
},
{
"id": "heatmap",
"source": "source",
"type": "heatmap",
"paint": {
"heatmap-radius": 50,
"heatmap-weight": 10,
"heatmap-intensity": 0.9,
"heatmap-color": "red"
}
}
]
}

0 comments on commit 514992c

Please sign in to comment.