Click here to Skip to main content
15,887,434 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
I am using googlemaps.subgurim.net google map in my project. Geocode funtion was some times not working in server system,here i am converting latitude and longitude to human readable address.some times geocode staus returns 500 and server error,this time this code not working.when
geocode returns 500 code and server error that time lat,lng address was not coming...


C#
string sMapKey = ConfigurationManager.AppSettings["googlemaps.subgurim.net"];
                    GeoCode objAddress = new GeoCode();
                    objAddress = GMap.geoCodeRequest(new GLatLng(Convert.ToDouble(status.Rows[0][0]), Convert.ToDouble(status.Rows[0][1])), sMapKey);
StringBuilder sb = new StringBuilder();
                    if (objAddress.valid)
                    {
                        sb.Append(objAddress.Placemark.address.ToString());
                        string address = sb.ToString();
                        lblPlace.Text = address;
                    }
Posted
Updated 16-Apr-13 21:32pm
v2

1 solution

Hi,

500 is an internal server error. Basically this means the server encountered an internal error while processing your request.
Maybe you should switch to the official Google server or use Bing Maps API to have a more stable and reliable server which processes your message.

cheers,
Marco Bertschi
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900