-function addMarkerToMap(position, icon, description) {
- var marker = L.marker(position, icon ? {icon: icon} : null).addTo(map);
-
- if (description) {
- marker.bindPopup(description);
- }
-
- return marker;
-}
-
-function removeMarkerFromMap(marker) {
- map.removeLayer(marker);
+function getUserIcon(url) {
+ return L.icon({
+ iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
+ iconSize: [21, 25],
+ iconAnchor: [12, 27]
+ });