prevent popup from appearing when clicking outside wms layer

المشرف العام

Administrator
طاقم الإدارة
Any help with this would be appreciated. I am projecting a WMS-layer on a map using OpenLayers and Geoserver. The next thing I want to do is to display info on any given feature in my WMS-layer in a popup whenever a user clicks it.

This is all working fine, but my problem is that whenever I click outside the WMS-layer, I get an empty popup. However, I only want a popup to appear when a user clicks an actual feature.

Does anyone know how to fix this? Thnx in advance!



أكثر...
 
أعلى