X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/20e5f756be74c8adf31d7ec3a6406a2b4bdb22c1..e838dddf12eab85e43683cb07f1f0c4619d7a47e:/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); }); });