Skip to content

Instantly share code, notes, and snippets.

Created July 27, 2014 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/c084ca73c7a075ce704f to your computer and use it in GitHub Desktop.
Save anonymous/c084ca73c7a075ce704f to your computer and use it in GitHub Desktop.
var markers = new L.FeatureGroup();
function locate_map(_lat, _lon) {
map.setView([_lat, _lon], 18);
var marker = L.marker([_lat, _lon], { icon: marker_icon })
.addTo(map)
.bindPopup("LT1")
.update();
markers.addLayer(marker);
map.addLayer(markers);
var map_hash = new L.Hash(map);
}
function removeAllMarkers(){
map.removeLayer(markers);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment