Wednesday, January 25, 2012 7:31 PM
Firstly, does anybody in the dev team for bing maps frequent (or even visit) these forums? If not, where can I go to post an issue with the SDK?
This is my problem:
I have a bing map that is not always in view (due to some collapsible elements it's sometimes hidden). However, because embedding a bing map on my page assigned a keyup event listener to the document, no matter if the map is in view or not, it always 'moves' based on me pushing the arrow keys.
I've tested this and if the map is hidden and I push an arrow key, then when I expand the collapsible element that map view has changed due to it responding to the keyup event on the document.
Yes, I've already come up with crappy partial workarounds - but this use-case describes an issue where you have to remove the keyup event from the document and instead put it on the map itself!!!
- Moved by Richard_BrundrittMicrosoft Employee, Owner Friday, March 16, 2012 6:34 PM (From:Bing Maps: Map Control and Web services Development)
Thursday, January 26, 2012 9:28 AMOwnerThe dev team and other members of the Bing Maps team frequently go through these blogs. I'm not on the dev team but am on the Bing Maps team. Would you be able to provide sample code that reproduces this issue? If I'm able to reproduce the issue I'll pass it on to the dev team for investigation.
- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Thursday, February 02, 2012 1:24 AM
Thursday, January 26, 2012 11:43 AM
Click the "Hide Bing Map" link, then push an arrow key (it's easiest to notice if you push and hold an arrow in a single direction) for a second or two) and then click "Bing Map" - you'll notice the map is in a different position than when the map first loaded (or whatever position you had it in when you clicked "Hide Bing Map".
While this behaviour isn't really what I would consider a bug, it is an edge-case that illustrates that it's poor practice to move the map via all keyup events, even if the map isn't visible.
There might be a a 'work around' in the API itself where I can cancel bing map events myself if I know the map is hidden, but I'm not sure what it would be....