Add traps to cell details page
This commit is contained in:
parent
0bd1a10753
commit
885b58a0ab
6 changed files with 109 additions and 22 deletions
|
|
@ -132,14 +132,13 @@ class MapAggregate extends HTMLElement {
|
|||
'fill-color': '#0dcaf0'
|
||||
}
|
||||
});
|
||||
var self = this;
|
||||
map.addInteraction("tegola-click-interaction", {
|
||||
type: "click",
|
||||
target: { layerId: "mosquito_source" },
|
||||
handler: (e) => {
|
||||
const coordinates = e.feature.geometry.coordinates.slice();
|
||||
const properties = e.feature.properties;
|
||||
self.dispatchEvent(new CustomEvent("cell-click", {
|
||||
this.dispatchEvent(new CustomEvent("cell-click", {
|
||||
bubbles: true,
|
||||
composed: true, // Allows event to cross shadow DOM boundary
|
||||
detail: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue