X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20e5f756be74c8adf31d7ec3a6406a2b4bdb22c1..898cc828dd1f1167f85abbf35c8e3f0ed640ac1e:/app/views/site/_potlatch.html.erb?ds=sidebyside diff --git a/app/views/site/_potlatch.html.erb b/app/views/site/_potlatch.html.erb index a1c637b79..d48fd799d 100644 --- a/app/views/site/_potlatch.html.erb +++ b/app/views/site/_potlatch.html.erb @@ -51,11 +51,9 @@ $(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(); - doSWF(lat, lon, zoom || 15); + doSWF(data.lat, data.lon, data.zoom || 15); }); });