]> git.openstreetmap.org Git - rails.git/blobdiff - app/assets/javascripts/map.js.erb
Update the Layers control when layers are added or removed
[rails.git] / app / assets / javascripts / map.js.erb
index ce75c1700a7fd5303550ce1331b56689a24bac79..6701cf74011009fa320ef5616ceeed08a32510fc 100644 (file)
@@ -112,11 +112,14 @@ function createMap(divName, options) {
   return map;
 }
 
-function getArrowIcon() {
+function getUserIcon(url) {
   return L.icon({
-    iconUrl: <%= asset_path('arrow.png').to_json %>,
-    iconSize: [25, 22],
-    iconAnchor: [22, 20]
+    iconUrl: url || <%= asset_path('marker-red.png').to_json %>,
+    iconSize: [25, 41],
+    iconAnchor: [12, 41],
+    popupAnchor: [1, -34],
+    shadowUrl: <%= asset_path('images/marker-shadow.png').to_json %>,
+    shadowSize: [41, 41]
   });
 }