Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I am doing a web application in Asp.Net, to retrieve Near By Places.

For getting this, i am using the below link,

https://maps.google.com/?q=area&near=ameerpet&radius=1

From the above link i am getting the places with in 5 kms having the output in the form of displaying locations in Google Maps.

But i want to give the above link as input and i need to get my output as in the form of XML format by using C# Coding or JavaScript in ASP.Net.

My Output Need to be like as below:
----------------------------------


<Area>

Keshavanagar Colony, Srinagar Colony Rd, Yousufguda, AP, India ‎

</Area>





<Area>

MCH Park Area, Padala Ramareddy Colony, Yousufguda, Hyderabad, AP, India
</Area>





<Area>

Athithi Inn, Dharam Karan Rd, Divyashakti Appartments, Ameerpet, Hyderabad, AP 500016, India

</Area>




<Area>

GreenPark-Hyderabad, 7-1-26, Ameerpet Road,Begumpet,Hyderabad, Andhra Pradesh 500016, India ‎

</Area>



and soon......



Can any one please help me how to convert google maps to XML format by using C# Coding or Javascript in ASP.Net.

Thanks in Advance
Posted
Comments
MTProgrammer 30-Oct-13 18:11pm    
What does the data look like coming back from GMaps? Is it JSON (Javascript Object Notation)?
Chakri P 31-Oct-13 0:59am    
Hi, see this below link;

https://maps.google.com/?q=area&output=json&near=ameerpet&radius=1

By using this link i am getting my output as JSON file.

But i don't want to download that file. Just i want to make a call to that link from my C# Code and i need to seperate my address block from that and i need to display that in my ASP Listbox or grid View Control.

By using that link i have tried converting JSON data to string or an array variable with C# code. My Code is like as,



var address = String.Format("https://maps.google.com/?q=area&output=json&near=ameerpet&radius=1");

var result = new System.Net.WebClient().DownloadString(address);

JavaScriptSerializer jss = new JavaScriptSerializer();

Object a = jss.DeserializeObject(result);



I am getting my result JSON data in "result" variable. But at the time of deserialization, i am getting an error.

I was struct at this area.

Can any one please help me by providing code to convert a JSON data to a string or an array format using C# Coding. As i need to display that data in ASP Listbox.

Thanks in Advance.

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