×

First time here?

You are looking at the most recent posts. You may also want to check out older archives. Please leave a comment, ask a question and consider subscribing to the latest posts via RSS or email. Thank you for visiting!

there's been some questions to me and in my local community about my vague references to my geocoder provider (sorry andrew).  the demonstration/explanation of that provider is here in my "geocode provider" post (not sure why i didn't make that part of the code gallery originally, apologies -- it now is).  i hope that helps.

i've also just uploaded an example of how you can use virtual earth for geocoding...i've wrapped it in a windows forms app to show that you can leverage virtual earth in a windows forms application as well.  i hope that helps.

basically what happens is the form calls a script:

   1:  private void button1_Click(object sender, EventArgs e)
   2:  {
   3:      AddPushpin.Visible = false;
   4:      executeScript(ClearAllPushpins);
   5:      executeScript(FindLocation, LocationToFind.Text);
   6:  }


on the html page implementing the map rendering, i have a callback function that calls back into my winforms, providing the latlong:

   1:  function OnFoundLocation(e)
   2:  {
   3:      if (e.length > 0)
   4:      {
   5:          var latLon = e[0].LatLong;
   6:          window.external.LocationFound(latLon.Latitude, latLon.Longitude);
   7:      }
   8:  }


File: Virtual Earth Geocode in WinForms



DISCLAIMER:

The opinions/content expressed on this blog are provided "ASIS" with no warranties and are my own personal opinions/content (unless otherwise noted) and do not represent my employer's view in any way.