Advertisement
Guest User

Untitled

a guest
Apr 1st, 2015
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.07 KB | None | 0 0
  1. <html>
  2. <head>
  3.   <meta charset=utf-8 />
  4.   <title></title>
  5.   <script src='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.js'></script>
  6.   <link href='https://api.tiles.mapbox.com/mapbox.js/v2.1.5/mapbox.css' rel='stylesheet' />
  7.   <style>
  8.     body { margin:0; padding:0; }
  9.     .map { position:absolute; top:0; bottom:0; width:100%; }
  10.   </style>
  11. </head>
  12. <body>
  13. <div id='map-leaflet' class='map'> </div>
  14. <script>
  15. L.mapbox.accessToken = 'pk.eyJ1IjoibmlraXRhMDgiLCJhIjoiOWdtQVZCRSJ9.3NjNdwq3rqvfH8276ESiag';
  16. var mapLeaflet = L.mapbox.map('map-leaflet','nikita08.lj9ankd8')
  17.   .setView([37.8, -96], 4)
  18. var i=0;
  19. //var x=38.913184
  20. //var y=-77.031952
  21. function getRandomArbitrary(min, max) {
  22.     return Math.random() * (max - min) + min;
  23. }
  24. for(i=0;i<10;i++){
  25.     var x= getRandomArbitrary(38.913184,-77.031952);
  26.     var y= getRandomArbitrary(38.913184,-77.031952);
  27.     L.marker([x,y]).addTo(mapLeaflet);
  28.     //x++;
  29.     //y++;
  30.     //L.marker([37.775408,-122.413682]).addTo(mapLeaflet);
  31. }
  32. //L.mapbox.map('mapbox.satellite');
  33. mapLeaflet.scrollWheelZoom.disable();
  34. </script>
  35. </body>
  36. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement