クリックではなくマウスオーバーでポップアップを表示しようとしています。現在、bindPopupメソッドを使用してフィーチャーレイヤーから動的に情報を表示しています。しかし、マウスオーバーでこれを機能させる正しい方法がわかりません。<\/P>
<\/P>
また、アイコンをクリックすると、ポップアップがページの上部をはみ出すことがあります。これを防ぐ方法はありますか?<\/P>
さらに、ユーザーが地図のズームや位置をスクロールやパンできないように固定する方法についてもアドバイスをお願いします。<\/P>
ご協力ありがとうございます!! <\/P>
JSFiddle<\/A> <\/P>ライブ: http:\/\/aquagear.site44.com\/<\/A> <\/P><\/BODY><\/HTML>
ライブ:
Your fiddle seems to not be working but I think I understand what you are trying to do.
locations<SPAN class="punctuation token">.</SPAN><SPAN class="token function">bindPopup</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="comment token">/*Insert your popup information*/</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">{</SPAN> maxWidth<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">560</SPAN><SPAN class="punctuation token">,</SPAN> maxHeight<SPAN class="punctuation token">:</SPAN> <SPAN class="number token">500</SPAN> <SPAN class="punctuation token">}</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The Popup object has options that are found in the leaflet documentation: https://leafletjs.com/reference-1.3.2.html#popup-l-popup
you're asking too many different questions in a single geonet post.
1. instead of calling bindPopup(), you'll need to implement your own logic within featureLayer.on("mouseover") / featureLayer.on("mouseout") (example)
2. by default, the popup option autoPan is set to true. this should ensure that the popup is displayed even if the map has to be recentered.
3. check out the leaflet map constructor option maxBounds
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.