Advertisement
elsemTim

Untitled

Jun 4th, 2017
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="utf-8" />
  5.     <title>Контроль и отслеживание android-устройства</title>
  6.     <link rel="shortcut icon" href="images/icon.png" type="image/png">
  7.     <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"/>
  8. </head>
  9. <body>
  10.     <div id="map" style="width: 100%; height: 800px"></div>
  11.  
  12.     <script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
  13.     <script src="leaflet-src.js"></script>
  14.     <script type="text/javascript" src="../dist/leaflet.ajax.js"></script>
  15.     <script src="spin.js"></script>
  16.     <script src="leaflet.spin.js"></script>
  17.  
  18.     <script>
  19.         var map = L.map('map').setView([56.740842, 37.223517], 17);
  20.         mapLink =
  21.             '<a href="http://openstreetmap.org">OpenStreetMap</a>';
  22.         L.tileLayer(
  23.             'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
  24.             attribution: '&copy; ' + mapLink + ' Contributors',
  25.             maxZoom: 18,
  26.             }).addTo(map);
  27.        
  28.         var planes = [
  29.         ["04.06.2017 20:00",56.740842, 37.223517],
  30.         ["04.06.2017 20:05",56.739763, 37.223356],
  31.         ["04.06.2017 20:10",56.739887, 37.219001],
  32.         ];
  33.        
  34.         for (var i = 0; i < planes.length; i++) {
  35.             marker = new L.marker([planes[i][1],planes[i][2]])
  36.                 .bindPopup(planes[i][0])
  37.                 .addTo(map);
  38.         }
  39.        
  40.         var polyline = L.polyline([
  41.             [56.740842, 37.223517],
  42.             [56.739763, 37.223356],
  43.             [56.739887, 37.219001]
  44.             ],
  45.             {
  46.                 color: 'red',
  47.                 weight: 7,
  48.                 opacity: .7,
  49.                 dashArray: '20,15',
  50.                 lineJoin: 'round'
  51.             }
  52.             ).addTo(map);
  53.     </script>
  54. </body>
  55. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement