// IE doesn't play nice attaching onkeyup/onkeydown to the window object... var key_event_handle = dojo.isIE ? dojo.query('body')[0] : window; dojo.connect(key_event_handle, "onkeydown", function(evt) { if (evt.ctrlKey || evt.keyCode == 17) { map.disablePan(); map.disableRubberBandZoom(); } }); dojo.connect(key_event_handle, "onkeyup", function(evt) { if (evt.ctrlKey || evt.keyCode == 17) { map.enablePan(); map.enableRubberBandZoom(); } });
Hi there,we set up a map, using a rest service in an ArcGISDynamicMapServiceLayer.By pressing the Ctrl key while dragging the mouse and let go again, the map sticks to the mouse pointer and a continous panning is being performed It's not possible to cancel the panning. The only way to get out is to load the website again.I reproduced this in Esri example maps as well, as:http://help.arcgis.com/en/webapi/javascript/arcgis/demos/toolbar/toolbar_edit.htmlAny clues how to avoid/cancel this pan?CheersMarcello
Membros conectados podem postar, seguir atualizações e mais. Novo aqui? Registre uma conta gratuita.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.