Click here to Skip to main content
15,909,373 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: FML Pin
#realJSOP23-Oct-17 5:18
professional#realJSOP23-Oct-17 5:18 
GeneralRe: FML Pin
W Balboos, GHB23-Oct-17 8:17
W Balboos, GHB23-Oct-17 8:17 
GeneralWhy Google Sucks Today Pin
#realJSOP23-Oct-17 4:09
professional#realJSOP23-Oct-17 4:09 
GeneralRe: Why Google Sucks Today Pin
The pompey23-Oct-17 4:40
The pompey23-Oct-17 4:40 
GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 4:46
professional#realJSOP23-Oct-17 4:46 
GeneralRe: Why Google Sucks Today Pin
lopatir23-Oct-17 4:58
lopatir23-Oct-17 4:58 
GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 5:13
professional#realJSOP23-Oct-17 5:13 
GeneralRe: Why Google Sucks Today Pin
lopatir23-Oct-17 5:42
lopatir23-Oct-17 5:42 
oh, didn't see the "geocode".
been a while since I did that.
quick notes )looking at some old code)
replace the spaces in the address with %20
the answers come back as decimal strings (not d.mmss) so for ex 1 degree 30 min would be 1.50000
sometimes it adds extra lat & lon results (POI's?? alternate similar?) - be sure to use FirstOrDefault
quick snippet (ignore the style)
decimal lat = 0m, lon = 0m;
WebRequest request = WebRequest.Create("http://maps.googleapis.com/maps/api/geocode/xml?sensor=false&address=" + addr.Replace(" ", "%20"));
using (Stream stream = response.GetResponseStream()) {
    XDocument document = XDocument.Load(new StreamReader(stream));
    XElement longitudeElement = document.Descendants("lng").FirstOrDefault();
    XElement latitudeElement = document.Descendants("lat").FirstOrDefault();
        if (longitudeElement != null && latitudeElement != null) {
            lon = Decimal.Parse(longitudeElement.Value, CultureInfo.InvariantCulture);
            lat = Decimal.Parse(latitudeElement.Value, CultureInfo.InvariantCulture);
    ...

above from old code used at client site for 4 years, never missed yet.
Installing Signature...
Do not switch off your computer.

GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 5:58
professional#realJSOP23-Oct-17 5:58 
GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 6:00
professional#realJSOP23-Oct-17 6:00 
GeneralRe: Why Google Sucks Today Pin
lopatir26-Oct-17 5:00
lopatir26-Oct-17 5:00 
GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 6:06
professional#realJSOP23-Oct-17 6:06 
GeneralRe: Why Google Sucks Today Pin
Basildane23-Oct-17 6:28
Basildane23-Oct-17 6:28 
GeneralRe: Why Google Sucks Today Pin
Daniel Pfeffer23-Oct-17 7:18
professionalDaniel Pfeffer23-Oct-17 7:18 
GeneralRe: Why Google Sucks Today Pin
Eddy Vluggen23-Oct-17 7:27
professionalEddy Vluggen23-Oct-17 7:27 
GeneralRe: Why Google Sucks Today Pin
#realJSOP23-Oct-17 8:04
professional#realJSOP23-Oct-17 8:04 
GeneralRe: Why Google Sucks Today Pin
Eddy Vluggen23-Oct-17 8:13
professionalEddy Vluggen23-Oct-17 8:13 
GeneralRe: Why Google Sucks Today Pin
dandy7223-Oct-17 8:23
dandy7223-Oct-17 8:23 
GeneralSPA, JavaScript, Mobile and caching Pin
raddevus23-Oct-17 2:57
mvaraddevus23-Oct-17 2:57 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
CodeWraith23-Oct-17 3:06
CodeWraith23-Oct-17 3:06 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
raddevus23-Oct-17 3:11
mvaraddevus23-Oct-17 3:11 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
CodeWraith23-Oct-17 4:28
CodeWraith23-Oct-17 4:28 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
raddevus23-Oct-17 5:14
mvaraddevus23-Oct-17 5:14 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
CodeWraith23-Oct-17 5:21
CodeWraith23-Oct-17 5:21 
GeneralRe: SPA, JavaScript, Mobile and caching Pin
raddevus23-Oct-17 5:49
mvaraddevus23-Oct-17 5:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.