Fixing popup in example
This commit is contained in:
@@ -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());
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user