geocoding with virtual earth and windows forms
| Commentsthere'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: }
Please enjoy some of these other recent posts...
Comments