Thank you Brenden. I think you have steered me in the right direction. I have not got it working yet, but I have some additional information to share. Inspecting the elements after page load, I can see that kentico generates the following line at the end of the script to create the map MM.Events.addHandler(p_lt_ctl02_pageplaceholder_p_lt_ctl10_BingMaps2_map, 'keydown', customKeyDown);
At the top of the body there is also a script var MM = Microsoft.Maps;
From this I gather that p_lt_...
is the variable name for this particular map, and that I can write MM
in place of Microsoft.Maps
. I have rewritten my inline javascript statement like so. MM.Events.addHandler(p_lt_ctl02_pageplaceholder_p_lt_ctl10_BingMaps2_map, 'mousewheel', function(e) { if(e.targetType == 'map') { e.handled = true; } });
I have also tried MM.Events.addHandler(p_lt_ctl02_pageplaceholder_p_lt_ctl10_BingMaps2_map, 'mousewheel', function(e) { if(e.targetType == 'p_lt_ctl02_pageplaceholder_p_lt_ctl10_BingMaps2_map') { e.handled = true; } });
and using Microsoft.Maps
in place of MM
in my scripts.
I have also tried using MM.Map
or Map
in place of map
on the targetType part.
MM.Events.addHandler(p_lt_ctl02_pageplaceholder_p_lt_ctl10_BingMaps2_map, 'mousewheel', function(e) { if(e.targetType == 'MM.Map') { e.handled = true; } });
I even tried removing the entire if(e.targetType == 'map')
part of the script.
None of these attempts resulted in mouse wheel being disabled for my bing map. Any further suggestions on what I should try next?