Right click not working on datalayer
ahmadzt opened this issue · 1 comments
ahmadzt commented
after loading datalayer onto the map, right click is no longer working on area covered by datalayer. it works perfectly outside datalayer area
this is how I load the datalayer
let state = new google.maps.Data();
state.addGeoJson(Selangor);
state.setMap(this.map);
state.setStyle(feature => {
return {
fillColor: '#ffffff',
fillOpacity: 0.01,
strokeWeight: 1,
}
})
and this is how it looks like
ahmadzt commented
I have resolved this. Need to set datalayer clickable
attribute to false
so that it will take any right click event available on the map
state.setStyle(feature => {
return {
fillColor: '#ffffff',
fillOpacity: 0.01,
strokeWeight: 1,
clickable: false
}
})