vb.net - Connecting Bing map in VB using web browser -


i have written code allows user click map button takes them bing maps problem when using google maps instead address automatically populate search field , complete search me, have had switch bing maps because google maps freeze , tell me unsupported. know have add in addition code allow bing automatically search information has gather fields linked to.

private sub btnmap_click(sender object, e eventargs) handles btnmap.click     form2.show()      ' search google maps exchange      dim postcode string = postcodetextbox.text     dim address string = addresstextbox.text        try         dim queryaddress new stringbuilder          queryaddress.append("http://www.bing.com/maps/?")          if postcodetextbox.text <> string.empty             queryaddress.append(postcode + "," & "+")         end if          if addresstextbox.text <> string.empty             queryaddress.append(address + "," & "+")         end if          form2.internet.navigate(queryaddress.tostring)       catch ex exception         messagebox.show("unable retrieve data")     end try   end sub 

several options - can read documentation on bing api, can read documentation on google api, or can take @ google maps search url , take there:

' search google maps exchange  dim postcode string = postcodetextbox.text dim address string = addresstextbox.text  try     dim queryaddress new stringbuilder      queryaddress.append("https://www.google.com/maps/place/")     if addresstextbox.text <> string.empty         queryaddress.append(string.join("+", address.split(" ".tochararray(), _                              stringsplitoptions.removeemptyentries)))     end if      if postcodetextbox.text <> string.empty         queryaddress.append("+" & postcodetextbox.text)     end if      form2.internet.navigate(queryaddress.tostring) catch ex exception     messagebox.show("unable retrieve data") end try 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -