openstreetmap-website/app/views/changeset/_changeset_map_add.html.erb
Mikel Maron 48929e8781 Add a map to the changeset list page
Add a map to the changeset list page, with a bounding box for each
changeset and highighting when the mouse is placed over either a box
on the map or a row of the table.
2011-05-01 22:55:28 +01:00

8 lines
508 B
Text

var minlon = <%= changeset_map_add.min_lon / GeoRecord::SCALE.to_f %>;
var minlat = <%= changeset_map_add.min_lat / GeoRecord::SCALE.to_f %>;
var maxlon = <%= changeset_map_add.max_lon / GeoRecord::SCALE.to_f %>;
var maxlat = <%= changeset_map_add.max_lat / GeoRecord::SCALE.to_f %>;
var bbox = new OpenLayers.Bounds(minlon, minlat, maxlon, maxlat);
bounds.extend(bbox);
box = addBoxToMap(bbox, {name: "changeset-<%= changeset_map_add.id %>"}, true);