This project is read-only.

Geocoding without map refresh

May 27, 2009 at 8:20 AM

I went through the provided examples for geocoding and it is clear to me that with a simple GoogleMap1.Address = address; I can perform a geocoding but this doesn't work in my case.

My goal is to go through a DB and check if the latlng of a point stored in the DB is contained in the circle defined by radius in km and address.

So my first step is to get the latlng of the given address without any refresh of the map (well in some cases the map is not even displayed/exists), thats' why GoogleMap1.Address = address; doesn't work in my case.

Another control that I'm currently using (and would like to replace with yours) has the following method that it is very similar to the normal gmap js: GeoCode geocode = GMap.geoCodeRequest(TxtAddress, Key);

Can I do something similar with your control?



Jun 3, 2009 at 9:04 AM

So noone can tell me if it is possible to do some geocoding without updating/applying the result to the map but just get the latlng of a given address?



Jun 3, 2009 at 11:02 AM


You cannot do it with the existing control.
The purpose of the control is to wrap and show google maps.
Its is not a geocoding client.
It uses the geocoding service but in context of rendering out the map.

However, you have all the source code and you are very welcome to implement that only geocoding feature.
Further more, I will be glad to add it to the control once you implement it.


Jun 3, 2009 at 12:12 PM

Ciao Velio and thanks a lot for the info. I'll look into the source code trying to implement this, I'll keep you posted :)



Jun 4, 2009 at 12:27 PM


I looked through the sources and as I do not master javascript, I have opted to use Google Maps API Geocoding Service directly over HTTP (i.e.,+Mountain+View,+CA&output=json&oe=utf8&sensor=true_or_false&key=your_api_key)

Said that, I still think it would be a nice addition to your control, hope you decide to include it one day.

Again congrats for the job!


Apr 22, 2010 at 1:46 AM

Pmonte, do you have a code sample for the Google Maps AP Geocoding Service you can post. Did you end up creating a web service?  

I need to get the lat, long of an address and then search against my DB from the server side.

Thanks all help is appreciated.

Apr 26, 2010 at 8:51 AM
At the end I changed control but you can do a geocoding with something like this: WebRequest oRequest = WebRequest.Create(string.Format("{0}&sensor=false&language={1}®ion={2}", Address, GoogleMapsLanguage, ccTLDCountry)); WebResponse oResponse = oRequest.GetResponse(); StreamReader oReader = new StreamReader(oResponse.GetResponseStream()); string sContent = oReader.ReadToEnd(); see here for full info: