Fix overlay positioning in geolocation example

This commit is contained in:
Bruno Binet
2013-10-07 18:36:51 +02:00
parent 715236c1f6
commit 41085560f6

View File

@@ -1,6 +1,7 @@
goog.require('ol.Geolocation');
goog.require('ol.Map');
goog.require('ol.Overlay');
goog.require('ol.OverlayPositioning');
goog.require('ol.RendererHints');
goog.require('ol.View2D');
goog.require('ol.dom.Input');
@@ -37,7 +38,8 @@ geolocation.on('change', function() {
});
var marker = new ol.Overlay({
element: /** @type {Element} */ ($('<i/>').addClass('icon-flag').get(0))
element: /** @type {Element} */ ($('<i/>').addClass('icon-flag').get(0)),
positioning: ol.OverlayPositioning.BOTTOM_LEFT
});
map.addOverlay(marker);
// bind the marker position to the device location.