before_filter :authorize_web
layout 'site'
- def start
+ def start
+ @nodes = Node.find(:all, :order => "timestamp DESC", :limit=> 20)
end
def index
@nodes = Node.find(:all, :order => "timestamp DESC", :limit=> 20)
</div>
<div id="status"></div>
-<div id="object"></div>
+<div id="object">
+<h3>Recent Changes</h3>
+<ul>
+<% @nodes.each do |node| %>
+<li><%= node.id %> @ <a href="#" onclick="setMapCenter(new OpenLayers.LonLat(<%= node.lon.to_s %>, <%= node.lat.to_s %>), 16); return false;"><%= node.lat.to_s %>,<%= node.lon.to_s %></a></li>
+<% end %>
+</ul>
+</div>
</div>
function useMap() {
var bounds = map.getExtent();
setBounds(bounds);
- getData(bounds);
+ getData(bounds);
+ return false;
}
$("use_map").onclick = useMap;
function loadObjList() {
$("object").innerHTML="";
$("object").appendChild(objList);
+ return false;
}
function onFeatureSelect(feature) {