Merge pull request #11345 from MoonE/examples-fix-geographic
Fix the popup in the geographic example
This commit is contained in:
@@ -13,6 +13,8 @@ resources:
|
|||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css
|
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css
|
||||||
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
|
- https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.bundle.min.js
|
||||||
---
|
---
|
||||||
<div id="map" class="map"><div id="popup"></div></div>
|
<div id="map" class="map">
|
||||||
|
<div id="popup"></div>
|
||||||
|
</div>
|
||||||
<div id="info"></div>
|
<div id="info"></div>
|
||||||
|
|
||||||
|
|||||||
@@ -68,9 +68,11 @@ map.on('click', function (event) {
|
|||||||
const coordinate = feature.getGeometry().getCoordinates();
|
const coordinate = feature.getGeometry().getCoordinates();
|
||||||
popup.setPosition(coordinate);
|
popup.setPosition(coordinate);
|
||||||
$(element).popover({
|
$(element).popover({
|
||||||
placement: 'top',
|
container: element.parentElement,
|
||||||
html: true,
|
html: true,
|
||||||
|
sanitize: false,
|
||||||
content: formatCoordinate(coordinate),
|
content: formatCoordinate(coordinate),
|
||||||
|
placement: 'top',
|
||||||
});
|
});
|
||||||
$(element).popover('show');
|
$(element).popover('show');
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user