Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

C# - Extracting lat / long from http page source

Posted on 2013-11-07
2
Medium Priority
?
198 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 21

Accepted Solution

by:
Craig Wagner earned 2000 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

722 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