Simplify icon example
This commit is contained in:
+1
-3
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user