From 3d3b01bf2cda7e66275cc182bf27e69dc4c0ab36 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 2 Nov 2012 23:44:37 +1300 Subject: Little fun with javascript --- src/web/index.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src/web') 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', { -- cgit v1.2.3