Merge pull request #10107 from mike-000/patch-5

Update Vector Tile Info example test for no features
This commit is contained in:
Frédéric Junod
2019-10-10 08:47:40 +02:00
committed by GitHub

View File

@@ -23,7 +23,7 @@ map.on('pointermove', showInfo);
const info = document.getElementById('info');
function showInfo(event) {
const features = map.getFeaturesAtPixel(event.pixel);
if (!features) {
if (features.length == 0) {
info.innerText = '';
info.style.opacity = 0;
return;