Update test for no features
This commit is contained in:
@@ -23,7 +23,7 @@ map.on('pointermove', showInfo);
|
|||||||
const info = document.getElementById('info');
|
const info = document.getElementById('info');
|
||||||
function showInfo(event) {
|
function showInfo(event) {
|
||||||
const features = map.getFeaturesAtPixel(event.pixel);
|
const features = map.getFeaturesAtPixel(event.pixel);
|
||||||
if (!features) {
|
if (features.length == 0) {
|
||||||
info.innerText = '';
|
info.innerText = '';
|
||||||
info.style.opacity = 0;
|
info.style.opacity = 0;
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user