最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Svelte Maplibre Popup open issues - Stack Overflow

programmeradmin2浏览0评论

I am having a problem with a Popup opening on hovering over an area on a map

<script>
   let showPopup = false;

    const setPopup = (e: any) => {
       showPopup = true;
    }
 
</script>
<GeoJSON bind:data={info}>
  <Popup open={showPopup} lngLat={popupLngLat}>
    {#if popupData}
      <p class="govuk-body-s popup">
        {popupData}
      </p>
    {/if}
  </Popup>
</GeoJson>

I have tried adding an openOn='manual' option to the pop but that doesn't seem to help. The popup only opens when the area is clicked on instead of when hovered over.

I'm using Svelte 4 and svelte-maplibre: 0.9.8

发布评论

评论列表(0)

  1. 暂无评论