Using Leaflet: How do I get it to display one popup based on a condition?

المشرف العام

Administrator
طاقم الإدارة
Using Leaflet: How do I get it to display one popup based on a condition. See below.

basemap_0.addTo(map); var layerOrder=new Array(); function pop_thunder(feature, layer) { if (feature.properties.CODE = 0) { var popupContent = feature.properties.html1_exp; } else { var popupContent = feature.properties.html_exp; } layer.bindPopup(popupContent); }

أكثر...
 
أعلى