]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Fix user map icon and offset
[rails.git] / app / assets / javascripts / map.js.erb
index ce75c1700a7fd5303550ce1331b56689a24bac79..e4392827e31425acf0b7fbe88c9944b5f04d2654 100644 (file)
@@ -120,6 +120,14 @@ function getArrowIcon() {
   });
 }
 
+function getUserIcon(url) {
+  return L.icon({
+    iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
+    iconSize: [21, 25],
+    iconAnchor: [12, 27]
+  });
+}
+
 function addObjectToMap(object, zoom, callback) {
   $.ajax({
     url: OSM.apiUrl(object),