Remove map from OverlayOptions

This commit is contained in:
Éric Lemoine
2013-09-02 14:14:04 +02:00
parent dd4b2e3e88
commit 7e25ecb3dc
6 changed files with 27 additions and 28 deletions

View File

@@ -37,9 +37,9 @@ geolocation.on('change', function() {
});
var marker = new ol.Overlay({
map: map,
element: /** @type {Element} */ ($('<i/>').addClass('icon-flag').get(0))
});
map.addOverlay(marker);
// bind the marker position to the device location.
marker.bindTo('position', geolocation);