change leaflet location marker icon code example
Example 1: leaflet change marker location
marker.setLatLng(e.latlng);
Example 2: leaflet update marker icon
marker.setIcon(<Icon> icon);
marker.setLatLng(e.latlng);
marker.setIcon(<Icon> icon);