Solved

C# - Extracting lat / long from http page source

Posted on 2013-11-07
2
193 Views
Last Modified: 2013-11-11
Hi,

Assuming I had the source code of this page in a string.

https://maps.google.com.au/maps?f=q&hl=en&geocode=&q=3002+australia&output=js

What is the best way to extract the Lat/Long coordinates out of this part -
{center:{lat:-37.816144000000001,lng:144.980459}

Open in new window

into two seperate variables?

Thanks for your help
0
Comment
Question by:mhdi
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 500 total points
ID: 39633318
I'd take a look at using the HTML Agility Pack (http://htmlagilitypack.codeplex.com) to parse the HTML and extract the values you're interested in.
0
 

Author Comment

by:mhdi
ID: 39640521
Would it be possible/easier to use Regex?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
C# GridRow get Old/New Value 1 55
ADO.NET ENTITY DATA MODEL 3 30
Filename to be appended with DateTimeof Download 3 40
Get Client IP on RDS - VB.NET 15 15
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now