Hi!
I would like to have the ability to control whether you can pan the map from the map view based on certain signals. How would I be able to toggle whether the user can pan the map using the same settings that ArcGIS provides?
Thanks!
Nick
You will need to "accept" the mouse signals so they don't go through, and that should stop the default behavior from happening
<SPAN class="token function">connect</SPAN><SPAN class="punctuation token">(</SPAN>m_mapView<SPAN class="punctuation token">,</SPAN> <SPAN class="operator token">&</SPAN>MapGraphicsView<SPAN class="operator token">::</SPAN>mousePressed<SPAN class="punctuation token">,</SPAN> <SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="punctuation token">[</SPAN><SPAN class="keyword token">this</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="punctuation token">(</SPAN>QMouseEvent<SPAN class="operator token">&</SPAN> event<SPAN class="punctuation token">)</SPAN> <SPAN class="punctuation token">{</SPAN> event<SPAN class="punctuation token">.</SPAN><SPAN class="token function">accept</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">;</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>
This worked! Thank you
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.