aboutsummaryrefslogtreecommitdiff
path: root/web/m/app.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-10 14:53:58 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-10 14:53:58 +1200
commite6fbff254dcd4d7e1a1f5da6c5f847d84403dea2 (patch)
treead859b6ad2c0189af5b1139cfca2176f39b64596 /web/m/app.js
parentc47057df70a9322dad794d160582d8b84115b5c9 (diff)
downloadtrackermap-server-e6fbff254dcd4d7e1a1f5da6c5f847d84403dea2.tar.gz
trackermap-server-e6fbff254dcd4d7e1a1f5da6c5f847d84403dea2.tar.bz2
trackermap-server-e6fbff254dcd4d7e1a1f5da6c5f847d84403dea2.zip
Move mobile interface directory
Diffstat (limited to 'web/m/app.js')
-rw-r--r--web/m/app.js47
1 files changed, 47 insertions, 0 deletions
diff --git a/web/m/app.js b/web/m/app.js
new file mode 100644
index 000000000..744bd22bf
--- /dev/null
+++ b/web/m/app.js
@@ -0,0 +1,47 @@
+var mapPanel, toolbar, map;
+
+Ext.application({
+ name: "Traccar",
+
+ launch: function() {
+
+ toolbar = Ext.create('Ext.Toolbar', {
+ docked: 'top',
+ ui: 'light',
+ title: 'Traccar'
+ });
+
+ mapPanel = Ext.create('Ext.Panel', {
+ listeners: {
+ painted: function() {
+
+ var layer = new ol.layer.Tile({ source: new ol.source.OSM({
+ })});
+
+ var view = new ol.View({
+ center: ol.proj.fromLonLat([ -0.1275, 51.507222 ]),
+ zoom: 6,
+ maxZoom: 16
+ });
+
+ map = new ol.Map({
+ target: this.bodyElement.dom.id,
+ layers: [ layer ],
+ view: view
+ });
+ },
+
+ resize: function() {
+ map.updateSize();
+ }
+ }
+ });
+
+ Ext.create('Ext.Panel', {
+ fullscreen: true,
+ layout: 'fit',
+ items: [toolbar, mapPanel]
+ });
+
+ }
+});