Question

I'm interested in adding a textbox (and button) to the Default navigation bar in Bing Maps v7.

My intent is to add a place-name geocoder to help the user quickly zoom to a specific area on the map. (This is a service provided by Bing Maps API, I just need help adding the box to the control.) I can, but don't have to, use jQuery.

The website http://pietschsoft.com/post/2010/12/18/Bing-Maps-Ajax-7-Add-Custom-Navigation-Bar-Buttons-using-jQuery.aspx actually has some really great sample code showing how to add a button to the bar, though I can't seem to get a textbox to work properly. My suspicion is that Bing Maps is hijacking all of my key-presses to use for panning, etc., but I'm not positive.

Has anybody had any luck in doing this?

Thanks!

Was it helpful?

Solution

I solved the problem by putting an another div with the same background color and height, floating left at an x-offset of the width of the original navbar. The keypresses were being hijacked - it seems they've stolen all keyboard input for any elements that exist within the "Microsoft.Map" div. My div is one level higher up.

Here's how it turned out: enter image description here

And if anyone's interested, the default height and color for the Bing Maps v7 navbar is 26px, #FAF7F5.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top