X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20e5f756be74c8adf31d7ec3a6406a2b4bdb22c1..800f014486588b01eaaeca69be327b7e2c40ed43:/app/views/site/_potlatch.html.erb 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); }); });