change easy.button to get the location of user

المشرف العام

Administrator
طاقم الإدارة
I want to add a button to my leaflet that zooms to the position of the user. i cant figure out the right way. This is what i tried:

L.easyButton('
', function(btn, map){ map.locate({setView: true, maxZoom: 18}); }).addTo(map); var Test = L.popup().setContent("Your Location"); this does not work...



أكثر...
 
أعلى