Simplify icon example

This commit is contained in:
Andreas Hocevar
2021-01-27 12:23:02 +01:00
parent 2a694a682d
commit bd93ef204f
+1 -3
View File
@@ -56,7 +56,6 @@ const popup = new Overlay({
element: element, element: element,
positioning: 'bottom-center', positioning: 'bottom-center',
stopEvent: false, stopEvent: false,
offset: [0, -50],
}); });
map.addOverlay(popup); map.addOverlay(popup);
@@ -66,8 +65,7 @@ map.on('click', function (evt) {
return feature; return feature;
}); });
if (feature) { if (feature) {
const coordinates = feature.getGeometry().getCoordinates(); popup.setPosition(evt.coordinate);
popup.setPosition(coordinates);
$(element).popover({ $(element).popover({
placement: 'top', placement: 'top',
html: true, html: true,