Leaflet load data and edit feature properties on mouse click
问题 I am loading map data from a GeoJSON file and attaching a click event for every polygone. on click, the script should fetch data from the server AND modify one of the clicked polygon's properties. i.e: function onClick(e) { var status = e.target.feature.properties.ACCESS; $.ajax({ url: "http://127.0.0.1:8080/?&u=x&p="+e.target.feature.properties.ID_PARCELL, dataType: 'jsonp', type: 'GET', success: function(data) { status = data.status; e.target.feature.properties.ACCESS = data.status; e