views:

72

answers:

1

I am integrating bing maps into a web page. I am calling the GetDirections() method of my VEMap option. and setting the VERouteOptions.ShowDisambiguation property to true when I call VEMap.GetDirections(). So sometimes I get the following dialog:

'Select A Location' Dialog

The problem is sometimes the user will enter a second set of directions into my form, and dialog remains. I've done the following to to correct it:

    // In case the disambiguation dialog a.k.a "" is present from a previous direction search
    $('#myMap_veplacelistpanel').hide();

It seems to work, but it feels like a suboptimal approach. Is there a better way to do it?

UPDATE: Originally I was deleting the dialog. This caused problems so I just hide it now, and that solved the problems it created. Since I have not yet accepted my self answer, I am changing the question I changed the question to reflect it.

A: 

There is a problem with my previous approach. You need to hide the disambiguation dialog, not remove it, otherwise you get javascript errors if you enter an incomplete address a second time. Apparently the dialog is not regenerated every time an incomplete address is entered, its content is just replaces.

Justin Dearing