diff --git a/examples/icon.css b/examples/icon.css index 3881884e22..f25b6b7d33 100644 --- a/examples/icon.css +++ b/examples/icon.css @@ -1,6 +1,3 @@ #map { position: relative; } -#popup { - padding-bottom: 45px; -} \ No newline at end of file diff --git a/examples/icon.js b/examples/icon.js index 0ec6f9baba..5ef4099a7c 100644 --- a/examples/icon.js +++ b/examples/icon.js @@ -71,9 +71,7 @@ map.on('click', function(evt) { return feature; }); if (feature) { - var geometry = feature.getGeometry(); - var coord = geometry.getCoordinates(); - popup.setPosition(coord); + popup.setPosition(evt.coordinate); $(element).popover({ 'placement': 'top', 'html': true,