簡體   English   中英

在 ol-ext (OpenLayers) 的彈出功能中添加圖像

[英]Add images in popup feature of ol-ext (OpenLayers)

我正在嘗試在https://github.com/Viglino/ol-ext/blob/master/examples/popup/map.popup.feature.html提供的 ol-ext(OpenLayers)的彈出功能中添加圖像

關於如何在彈出窗口下方或其中添加圖像的任何解決方法? 我已經要求將其作為功能添加到官方存儲庫中。

您正在 HTML 表中顯示數據,因此要顯示圖像,您需要必要的 HTML 來構造圖像 - 在示例的情況下,您可以通過在圖像 src 的 url 中使用其 id 來顯示部門標志。 我使用的來源有大多數(但不是全部)法國部門的標志

      'id': {
        title: 'Flag',  // attribute's title
        before: '<img src="https://www.crwflags.com/fotw/images/f/fr-',
        after: '.gif">'
       }

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM