anchor.diff:  				projection: new OpenLayers.Projection("EPSG:4326")
   			});
   			map.addLayer(lgpx);
  - 
  -			var lonLat = new OpenLayers.LonLat(lon, lat).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject());
  -			map.setCenter(lonLat, zoom);
  - 
  -			var size = new OpenLayers.Size(21, 25);
  -			var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
  -			var icon = new OpenLayers.Icon('http://www.openstreetmap.org/openlayers/img/marker.png',size,offset);
  -			layerMarkers.addMarker(new OpenLayers.Marker(lonLat,icon));
  +			lgpx.events.register("featureadded", lgpx, function(f) {
  +				var components = f.feature.geometry.components;
  +				map.setCenter(components[components.length - 1].getBounds().getCenterLonLat(), zoom);
  +			});
   		}
  -		
  +
  +		function setAutoRefresh(val) {
  +			if (val)
  +				refreshStrategy.activate();
  +			else
  +				refreshStrategy.deactivate();
  +		}
  +
   		init();
  +		setAutoRefresh($("#autorefresh").is(":checked"));
   </script>
  
positive.code: 
  <h1><%= @track.name %></h1>
  
  <div style="width:640px; height:480px" id="map"></div>
  
  <% if @track.user_id == current_user.id %>
  
negative.code: <script src="http://www.openstreetmap.org/openlayers/OpenStreetMap.js"></script>
  
  <script type="text/javascript">
  		<% if @track.coordinates.size > 0 %>
  		var lat=<%= @track.coordinates.last.latitude %>;
  		var lon=<%= @track.coordinates.last.longitude %>;
  		<% else %>
  		var lat=0;
  		var lon=0;
  		<% end %>
  		var zoom=15;
  
  		var map; //complex object of type OpenLayers.Map
  		var refreshStrategy;
  
  		function init() {
  			map = new OpenLayers.Map ("map", {
  				controls:[
  