]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/site/_potlatch2.html.erb
Allow commenting on, and closing of, notes from the web site
[rails.git] / app / views / site / _potlatch2.html.erb
index 73ef782b588004d488f6662f8ec7a580d502650a..1d45d622356f7399a043d0110a87a561d06df77c 100644 (file)
 
   $(document).ready(function () {
     $("body").on("click", "a.set_position", function () {
-      var lat = parseFloat($(this).attr("data-lat"));
-      var lon = parseFloat($(this).attr("data-lon"));
-      var zoom = parseInt($(this).attr("data-zoom"));
+      var data = $(this).data();
 
       $("#potlatch").each(function () {
-        this.setPosition(lat, lon, Math.max(zoom || 15, 13));
+        this.setPosition(data.lat, data.lon, Math.max(data.zoom || 15, 13));
       });
     });
   });