diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2012-11-02 23:44:37 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2012-11-02 23:44:37 +1300 |
commit | 3d3b01bf2cda7e66275cc182bf27e69dc4c0ab36 (patch) | |
tree | 832cae444668edaaaa4dab6c2f3b64563e22d429 | |
parent | 383947fd6dbe7a26101f8217cbffafcd6cadadf8 (diff) | |
download | traccar-server-3d3b01bf2cda7e66275cc182bf27e69dc4c0ab36.tar.gz traccar-server-3d3b01bf2cda7e66275cc182bf27e69dc4c0ab36.tar.bz2 traccar-server-3d3b01bf2cda7e66275cc182bf27e69dc4c0ab36.zip |
Little fun with javascript
-rw-r--r-- | src/web/index.html | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/web/index.html b/src/web/index.html index 8bf468eff..47747344e 100644 --- a/src/web/index.html +++ b/src/web/index.html @@ -817,11 +817,24 @@ Ext.onReady(function() { } } }); + + var cityCarousel = [ + {lat: 59.95, lng: 30.3}, // Saint Petersburg + {lat: 40.664167, lng: -73.938611}, // New York + {lat: -36.840417, lng: 174.739869}, // Auckland + {lat: 48.8567, lng: 2.3508}, // Paris + {lat: 10.65, lng: -71.633333}, // Maracaibo + {lat: 35.689506, lng: 139.6917}, // Tokyo + {lat: 1.3, lng: 103.8}, // Singapore + {lat: 22.278333, lng: 114.158889}, // Hong Kong + {lat: 10.246944, lng: -67.596111}, // Maracay + {lat: 51.507222, lng: -0.1275} // London + ]; var map = Ext.create('Ext.ux.GMapPanel', { id: 'gmap', - setCenter: {lat: 59.95, lng: 30.3}, - zoomLevel: 10 + setCenter: cityCarousel[Math.floor((Math.random() * cityCarousel.length))], + zoomLevel: 9 }); var devicesPanel = Ext.create('Ext.grid.Panel', { |