javascript - Duplicate Marker Error in Leaflet -


How do you handle markers in sheet maps? My question is, when I place a marker on the map and place a different marker on the map, the first markers always come in or mix with another image.

Here is my code

  var note = document.getElementById ('note'); Var datepick = document.getElementById ('Demo 1'); Var Timepick = document.getElementById ('Timepick'); LayerPoly.On ('click', function (e) {var marker b = new L. marker (E.latange, {icon: icon3}); marker B.DindPop ("homecad" date and date; : "+ Datepick.value +" & lt; / br & gt; Time: "+ timepick.value +" & lt; / br & gt; Address: "+ note.value +" ") addTo (map); map .addlayer (markerB); Closing 2 (Marker B)  

Is there something wrong with the click event, I just want to have no other marker with the marker? Any help TYIA!


Comments

Popular posts from this blog

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -