This commit is contained in:
Éric Lemoine
2013-02-20 10:38:25 +01:00
parent 17c3936ab6
commit 5d14b9e2d4
1919 changed files with 559755 additions and 2588 deletions
+15
View File
@@ -1,11 +1,15 @@
goog.require('goog.debug.Console');
goog.require('goog.debug.Logger');
goog.require('goog.debug.Logger.Level');
goog.require('goog.style');
goog.require('ol.AnchoredElement');
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Geolocation');
goog.require('ol.Map');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
goog.require('ol.layer.TileLayer');
goog.require('ol.source.MapQuestOpenAerial');
@@ -27,3 +31,14 @@ var map = new ol.Map({
zoom: 0
})
});
var geolocation = new ol.Geolocation();
geolocation.bindTo('projection', map.getView());
var element = document.getElementById('geolocation');
var marker = new ol.AnchoredElement({
map: map,
element: element
});
marker.bindTo('position', geolocation);
goog.style.showElement(element, true);