From e6fbff254dcd4d7e1a1f5da6c5f847d84403dea2 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 10 Aug 2015 14:53:58 +1200 Subject: Move mobile interface directory --- web/m/app.js | 47 +++++++++++++++++++++++++++++++++++++++++++++++ web/m/index.html | 13 +++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 web/m/app.js create mode 100644 web/m/index.html (limited to 'web') 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] + }); + + } +}); diff --git a/web/m/index.html b/web/m/index.html new file mode 100644 index 000000000..aa7930ff0 --- /dev/null +++ b/web/m/index.html @@ -0,0 +1,13 @@ + + + +Traccar + + + + + + + + + -- cgit v1.2.3