Solved

C# - Extracting lat / long from http page source

Posted on 2013-11-07
2
194 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C# guarantee sql connection close 6 39
Hey!! 5 33
Create a WebAPI using a generic return parameter 9 24
transaction in asp.net, sql server 6 31
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

813 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

16 Experts available now in Live!

Get 1:1 Help Now