Fixing popup in example

This commit is contained in:
ahocevar
2012-09-28 19:19:46 +02:00
parent 3eebed4580
commit dcc3fdde96
2 changed files with 2 additions and 2 deletions

View File

@@ -35,7 +35,6 @@ var vienna = new ol.overlay.Overlay({
// Popup showing the position the user clicked
var popup = new ol.overlay.Overlay({
map: map,
element: document.getElementById('popup')
});
map.addEventListener('click', function(evt) {
@@ -44,5 +43,6 @@ map.addEventListener('click', function(evt) {
'Welcome to ol3. The location you clicked was<br>' +
ol.CoordinateFormat.hdms(ol.Projection.transformWithCodes(
coordinate, 'EPSG:3857', 'EPSG:4326'));
popup.setMap(evt.map);
popup.setCoordinate(evt.getCoordinate());
});