- <% @edits.each do |edit| %>
- <% if edit.has_valid_bbox? %>
- <% bbox = edit.bbox.to_unscaled %>
- var minlon = <%= bbox.min_lon %>;
- var minlat = <%= bbox.min_lat %>;
- var maxlon = <%= bbox.max_lon %>;
- var maxlat = <%= bbox.max_lat %>;
- var bbox = new OpenLayers.Bounds(minlon, minlat, maxlon, maxlat);
+ $("[data-changeset]").each(function () {
+ var changeset = $(this).data('changeset');
+ if (changeset.bbox) {
+ var bbox = new OpenLayers.Bounds(changeset.bbox.minlon, changeset.bbox.minlat, changeset.bbox.maxlon, changeset.bbox.maxlat);