GoogleDirection is giving an error for bad address

Jun 6, 2008 at 6:01 PM
Hi,
  I am using this control for my project to show the driving directions to my users. Whenever i am hiting with the bad address then it will throw a debug error 'meters' is null or not an object. TO resolve this i tried to send an request to google with this address and if it gives result then i am proceeding now. But i am still having the same error on some search criteria. Example: astoria
Again its throwing an error.
The below is my html code....

<

asp:Panel ID="PanelDirections" runat="server" Visible="true">

 

 

<artem:GoogleMap ID="GoogleDirections" runat="server" Width="720px" Height="500px"

 

 

Zoom="15" BorderStyle="Solid" BorderColor="#999999" BorderWidth="1">

 

 

<Directions>

 

 

<artem:GoogleDirection RoutePanelId="route" />

 

 

</Directions>

 

 

</artem:GoogleMap>

 

 

<div id="route">

 

 

</div>

 

 

<fieldset id="Fieldset1" runat="server" visible="false">

 

 

<legend>Extra Data</legend>

 

 

<br />

 

 

<asp:Literal ID="_ltrInfo" runat="server"></asp:Literal><br />

 

 

<asp:Button ID="Button2" runat="server" Text="Show" OnClick="HandleShowExtraData" />

 

 

</fieldset>

 

 

</asp:Panel>

 


Here is my codebehind code...........

GoogleMap1.Address = _txtTo.Text;

GoogleMap1.Markers.Clear();

 

GoogleMarker marker = new GoogleMarker(toAddress);

 

GoogleMap1.Markers.Add(marker);

Please help me anyone .
thanks in advance