diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-14 15:07:15 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-05-14 15:07:15 +1200 |
commit | b512fa18b7ff40cacce09aa5db02f9c29b3e9250 (patch) | |
tree | e4ba762f1fd350698b641bc1f0f24be7a19e6724 /webm/app.js | |
parent | f01ebc2af707bccfd29049afad7d081c58e7f771 (diff) | |
download | trackermap-server-b512fa18b7ff40cacce09aa5db02f9c29b3e9250.tar.gz trackermap-server-b512fa18b7ff40cacce09aa5db02f9c29b3e9250.tar.bz2 trackermap-server-b512fa18b7ff40cacce09aa5db02f9c29b3e9250.zip |
Add mobile web interface
Diffstat (limited to 'webm/app.js')
-rw-r--r-- | webm/app.js | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/webm/app.js b/webm/app.js new file mode 100644 index 000000000..744bd22bf --- /dev/null +++ b/webm/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] + }); + + } +}); |