Publishing edit branch
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
var view = new ol.View2D({
|
||||
center: [0, 0],
|
||||
zoom: 2
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: [
|
||||
new ol.layer.Tile({
|
||||
source: new ol.source.BingMaps({
|
||||
key: 'Ar33pRUvQOdESG8m_T15MUmNz__E1twPo42bFx9jvdDePhX0PNgAcEm44OVTS7tt',
|
||||
style: 'Road'
|
||||
})
|
||||
})
|
||||
],
|
||||
renderers: ol.RendererHints.createFromQueryData(),
|
||||
target: 'map',
|
||||
view: view
|
||||
});
|
||||
|
||||
var geolocation = new ol.Geolocation({
|
||||
tracking: true
|
||||
});
|
||||
geolocation.bindTo('projection', view);
|
||||
geolocation.once('change:position', function() {
|
||||
view.setCenter(geolocation.getPosition());
|
||||
view.setResolution(2.388657133911758);
|
||||
});
|
||||
Reference in New Issue
Block a user