I try to use map.setInfoWindowOnClick disable pop up window when drawing features, but it does not work. Sample like this one: ArcGIS API for JavaScript Sandbox, I open dev tool and use map.setInfoWindowOnClick(false), but the popup still can be show. Is there a way to disable the popup?
Thanks,
Yuki
Yuki,
For clusterlayer specifically you need to use:
clusterLayer.disableMouseEvents();
otherwise
map.setInfoWindowOnClick(false);
works fine.
Add this to ur code, if that helps u, please mark this answer as a correct
clusterLayer<SPAN class="punctuation token">.</SPAN><SPAN class="token function">on</SPAN><SPAN class="punctuation token">(</SPAN><SPAN class="string token">'click'</SPAN><SPAN class="punctuation token">,</SPAN><SPAN class="keyword token">function</SPAN><SPAN class="punctuation token">(</SPAN>e<SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">{</SPAN> map<SPAN class="punctuation token">.</SPAN>infoWindow<SPAN class="punctuation token">.</SPAN><SPAN class="token function">hide</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>
Yes, your solution is somehow correct, but the problem is that this would block the pop-up forever, should be a way like .off(event). BTW, the feature is still clickable, I really want to click action does not even click the feature. Anyway, thanks a lot.
Then , I didnt understand what u wanna do >.<
Actually, I want to use Draw Tool to create features on the map, but it turns out that if I cross any feature layers or other layers on the map, related popups will show which is really annoying. So I want to disable the popups during the drawing.
I found a solution is that use pop-up manager:
1. arcgisUtils.createMap(webMapId, "map", {mapOptions: mapOptions, usePopupManager: true}
2. map.setInfoWindowOnClick(false)
It works out when the map is created via web map id.
The remaining problem is that I need to implement the map that created by new Map().
P.S. The problem that I want to deal with is a little bit tricky ~_~
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.