Skip to content

Commit

Permalink
Add Bing Maps init code
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Feb 2, 2015
1 parent 902059b commit b79c04d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
13 changes: 9 additions & 4 deletions web/MapView.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ Ext.define('MapView', {

listeners: {
afterrender: function() {
var osm = new ol.layer.Tile({
source: new ol.source.OSM({})
});

/*var layer = new ol.layer.Tile({source: new ol.source.BingMaps({
key: 'AseEs0DLJhLlTNoxbNXu7DGsnnH4UoWuGue7-irwKkE3fffaClwc9q_Mr6AyHY8F',
imagerySet: 'Road'
})});*/

var layer = new ol.layer.Tile({source: new ol.source.OSM({
})});

var view = new ol.View({
center: ol.proj.transform(styles.map_center, 'EPSG:4326', 'EPSG:3857'),
Expand All @@ -35,7 +40,7 @@ Ext.define('MapView', {

this.map = new ol.Map({
target: this.body.dom.id,
layers: [ osm ],
layers: [ layer ],
view: view
});
},
Expand Down
18 changes: 9 additions & 9 deletions web/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<title>Traccar</title>
<link rel="stylesheet" type="text/css" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
<link rel="stylesheet" type="text/css" href="//openlayers.org/en/v3.1.1/css/ol.css">
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script>
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
<script type="text/javascript" src="http://openlayers.org/en/v3.1.1/build/ol.js"></script>
<script type ="text/javascript" src="Strings.js"></script>
<script type ="text/javascript" src="Styles.js"></script>
<script type ="text/javascript" src="Application.js"></script>
<title>Traccar</title>
<link rel="stylesheet" type="text/css" href="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/resources/ext-theme-neptune-all.css">
<link rel="stylesheet" type="text/css" href="//openlayers.org/en/v3.1.1/css/ol.css">
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/ext-all.js"></script>
<script type="text/javascript" src="//cdn.sencha.com/ext/gpl/5.1.0/build/packages/ext-theme-neptune/build/ext-theme-neptune.js"></script>
<script type="text/javascript" src="//openlayers.org/en/v3.1.1/build/ol.js"></script>
<script type ="text/javascript" src="Strings.js"></script>
<script type ="text/javascript" src="Styles.js"></script>
<script type ="text/javascript" src="Application.js"></script>
</head>
<body>
</body>
Expand Down

0 comments on commit b79c04d

Please sign in to comment.