Leaflet popup options with geoJSON data

المشرف العام

Administrator
طاقم الإدارة
In the following how would I customize the popup options? I want to add in the option for the keepInView to be true.

var myLayer = L.geoJson(polygon, { onEachFeature: yourOnEachFeatureFunction}).addTo(map);

function yourOnEachFeatureFunction(feature, layer){ if (feature.properties.name) { layer.bindPopup(feature.properties.name); }}



أكثر...
 
أعلى