[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 203
  • Last Modified:

C# - Extracting lat / long from http page source

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
mhdi
Asked:
mhdi
1 Solution
 
Craig WagnerSoftware ArchitectCommented:
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
 
mhdiAuthor Commented:
Would it be possible/easier to use Regex?
0

Featured Post

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now