title: Tracking web page via osm(open street map)
body: <p>I need to create a web page which will track a person via the open street map in which lat-long data will be sent via an app installed on his phone. the app will send the lat and long in JSON file to a server in a database from where my web page will take the data and show the path followed by the biker in dotted lines throughout the journey. I also searched for open layers simple examples... but couldn't get any more info... if anyone has done that please tell me how to approach in this and how to do it. Thank you guys</p>
  
  <p>I have to show the path followed by the person and in my map, with all the values of lat and long present in the database... I have to show a dotted line which is followed by the person.... I have integrated the map by passing the current lat and long in static data format.... but facing problem for dynamic fetching ... how can i show dotted line i.e the path which is followed by him...</p>
  
  <p>this is my code-- js code-</p>
  
  <pre><code>&lt;script&gt;
    function init() 
    {
      map = new OpenLayers.Map("mapdiv");
      var mapnik = new OpenLayers.Layer.OSM();
      map.addLayer(mapnik);
  
      var lonlat1 = new OpenLayers.LonLat(77.64760799999999,12.9081357).transform(
          new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
          new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator
        );
      var lonlat2 = new OpenLayers.LonLat(78.64760799999999,11.9081357).transform(
          new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
          new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator
        );  
  
      var zoom = 8;
  
      var markers = new OpenLayers.Layer.Markers( "Markers" );
      map.addLayer(markers);
      markers.addMarker(new OpenLayers.Marker(lonlat1));
      markers.addMarker(new OpenLayers.Marker(lonlat2));
      map.setCenter(lonlat2, zoom);
      map.setCenter(lonlat1, zoom);
  
    }
  &lt;/script&gt;
  &lt;body onload="init();"&gt;
  &lt;p&gt;&lt;h3 id="h3"&gt;Tracking Page With An Embeded Map&lt;/h3&gt;&lt;/p&gt;
  &lt;div id="mapdiv"&gt;&lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <p>just help me to dynamically fetch multiple data from the database and how to show that on the map. Above is the code for static long lat values only.. Thank you.</p>