Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <script>
  2. L.mapbox.accessToken = '<token_here>';
  3. var map = L.mapbox.map('map', 'mapbox.light').setView([29, -26], 2);
  4.  
  5. var marker = L.marker([-73, 40], {
  6. icon: L.mapbox.marker.icon({
  7. 'marker-color': '#f86767'
  8. })
  9. });
  10.  
  11. window.setInterval(function() {
  12.  
  13. marker.setLatLng(L.latLng(
  14.  
  15. <% out.print(MongoConnection.getLatitude("1")); %>,
  16. <% out.print(MongoConnection.getLongitude("1")); %> ));
  17.  
  18. }, 1000);
  19.  
  20. marker.addTo(map);
  21. out.println(t);
  22. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement