merlin2049er Well-Known Member Licensed User Longtime User Sep 8, 2014 #1 Hi, I'm passing the url to a webview...as follows. WebViewmap.LoadUrl("https://maps.google.com/maps/"& "@" & lat & "," & lon) Click to expand... I'm picking up the lat/long from the satellite no problem. The google maps page loads, but doesn't actually bring up the location. I tried that in a desktop browser, and it seems to be fine...
Hi, I'm passing the url to a webview...as follows. WebViewmap.LoadUrl("https://maps.google.com/maps/"& "@" & lat & "," & lon) Click to expand... I'm picking up the lat/long from the satellite no problem. The google maps page loads, but doesn't actually bring up the location. I tried that in a desktop browser, and it seems to be fine...
Air Member Licensed User Longtime User Sep 8, 2014 #2 merlin2049er said: Hi, I'm passing the url to a webview...as follows. I'm picking up the lat/long from the satellite no problem. The google maps page loads, but doesn't actually bring up the location. I tried that in a desktop browser, and it seems to be fine... Click to expand... Try... Code: https://maps.google.com/maps?q=" & lat & "," & lon & "&t=Default&iwloc=A" Last edited: Sep 8, 2014 Upvote 0
merlin2049er said: Hi, I'm passing the url to a webview...as follows. I'm picking up the lat/long from the satellite no problem. The google maps page loads, but doesn't actually bring up the location. I tried that in a desktop browser, and it seems to be fine... Click to expand... Try... Code: https://maps.google.com/maps?q=" & lat & "," & lon & "&t=Default&iwloc=A"
merlin2049er Well-Known Member Licensed User Longtime User Sep 8, 2014 #3 Tried that. That didn't work either. Upvote 0
Air Member Licensed User Longtime User Sep 8, 2014 #4 Hmmm, tried it on my app and it works. Did your lat / lon have a "," inside? If yes, replace it with "." Code: lat = lat.Replace(",",".") lon = lon.Replace(",",".") Upvote 0
Hmmm, tried it on my app and it works. Did your lat / lon have a "," inside? If yes, replace it with "." Code: lat = lat.Replace(",",".") lon = lon.Replace(",",".")
merlin2049er Well-Known Member Licensed User Longtime User Sep 8, 2014 #5 ok, I've got a ":" in side of it. I'll try. Code: lat = lat.Replace(":",".") lon = lon.Replace(":",".") Upvote 0
ok, I've got a ":" in side of it. I'll try. Code: lat = lat.Replace(":",".") lon = lon.Replace(":",".")
merlin2049er Well-Known Member Licensed User Longtime User Sep 8, 2014 #6 I'll try it again. I missed the '?q='. Upvote 0
merlin2049er Well-Known Member Licensed User Longtime User Sep 9, 2014 #7 Ok, getting closer. But google has no matching suggestions from those gps co-ordinates. Upvote 0
Air Member Licensed User Longtime User Sep 9, 2014 #8 What is "exactly" in the variables lat and lon? Upvote 0
sirjo66 Well-Known Member Licensed User Longtime User Sep 9, 2014 #9 Please try this: Code: Log("https://maps.google.com/maps?q=" & lat & "," & lon & "&t=Default&iwloc=A") But........ if you write that I've got a ":" in side of it may be that the coords inside lan and lon are in Sexagesimal format, not in decimal format (see here for an explanation). If it is true, you need to convert it, not only replace ":" with "." Sergio Upvote 0
Please try this: Code: Log("https://maps.google.com/maps?q=" & lat & "," & lon & "&t=Default&iwloc=A") But........ if you write that I've got a ":" in side of it may be that the coords inside lan and lon are in Sexagesimal format, not in decimal format (see here for an explanation). If it is true, you need to convert it, not only replace ":" with "." Sergio
DonManfred Expert Licensed User Longtime User Sep 9, 2014 #10 sirjo66 said: But........ if you write that I've got a ":" in side of it may be that the coords inside lan and lon are in Sexagesimal format, not in decimal format (see here for an explanation). If it is true, you need to convert it, not only replace ":" with "." Click to expand... That bring us back to Air said: What is "exactly" in the variables lat and lon? Click to expand... Upvote 0
sirjo66 said: But........ if you write that I've got a ":" in side of it may be that the coords inside lan and lon are in Sexagesimal format, not in decimal format (see here for an explanation). If it is true, you need to convert it, not only replace ":" with "." Click to expand... That bring us back to Air said: What is "exactly" in the variables lat and lon? Click to expand...
merlin2049er Well-Known Member Licensed User Longtime User Sep 9, 2014 #11 ok, after replacing the : with a . I've got the following co-ordinates... lat = 43.41.929 lon = -79.26.5548 Upvote 0
ok, after replacing the : with a . I've got the following co-ordinates... lat = 43.41.929 lon = -79.26.5548
merlin2049er Well-Known Member Licensed User Longtime User Sep 9, 2014 #12 Hmm, my gps on the phone must be off quite a bit. If I use the co-ordinates above I land in lake Ontario. lol I geocoded my address and it's... 43.6988297, -79.4425964 Upvote 0
Hmm, my gps on the phone must be off quite a bit. If I use the co-ordinates above I land in lake Ontario. lol I geocoded my address and it's... 43.6988297, -79.4425964
Air Member Licensed User Longtime User Sep 9, 2014 #13 I geocoded my address and it's... 43.6988297, -79.4425964 Click to expand... Tested. It works. I see Toronto, Kanada What is the Variable-Type of lat / lon? It must be String, if you use my HTTP-Link Upvote 0
I geocoded my address and it's... 43.6988297, -79.4425964 Click to expand... Tested. It works. I see Toronto, Kanada What is the Variable-Type of lat / lon? It must be String, if you use my HTTP-Link
merlin2049er Well-Known Member Licensed User Longtime User Sep 9, 2014 #14 Ok, I'll check the variable type. Thanks. But this is the location my phone was picking up, and it seems way off. lat = 43.41.929 lon = -79.26.5548 Upvote 0
Ok, I'll check the variable type. Thanks. But this is the location my phone was picking up, and it seems way off. lat = 43.41.929 lon = -79.26.5548
Air Member Licensed User Longtime User Sep 9, 2014 #15 lat = 43.41.929 lon = -79.26.5548 Click to expand... Ooops, These Koordinates show me a point in Germany if i delete the second points to lat = 43.41929 lon = -79.265548 i am in Lake Ontario Upvote 0
lat = 43.41.929 lon = -79.26.5548 Click to expand... Ooops, These Koordinates show me a point in Germany if i delete the second points to lat = 43.41929 lon = -79.265548 i am in Lake Ontario
merlin2049er Well-Known Member Licensed User Longtime User Sep 9, 2014 #16 I'm going to try the location manager. No luck with the gps, maybe it's my phone? I'll try another android phone if possible. Upvote 0
I'm going to try the location manager. No luck with the gps, maybe it's my phone? I'll try another android phone if possible.
sirjo66 Well-Known Member Licensed User Longtime User Sep 9, 2014 #19 Ok, I understand that you don't have read my above post. Air write to you: What is "exactly" in the variables lat and lon? Click to expand... but you don't answer So, I suppose that Code: lat = "43:41.929" lon = "-79:26.5548" but this is the same as Code: lat = 43.6988297 lon = -79.4425964 When you have 43:41.929, this is the same as 43° 41.929', so you need to convert it into decimal value. In fact, if I tell to you "an hour and an half", you can write "1:30" or "1.5" (it's the same !!) So, you need to convert 1:30 to 1.5 !!! How to do it ?? Very simple !! Take the value after ":" (in your case is 41.929) and divide by 60, that is 0.6988 Add the value before ":", and your decimal coords will be 43.6988 Same with lon -26.5548 / 60 + (-79) = -79.4426 Best regards Sergio P.S.: Belgravia Ave ?? Last edited: Sep 9, 2014 Upvote 0
Ok, I understand that you don't have read my above post. Air write to you: What is "exactly" in the variables lat and lon? Click to expand... but you don't answer So, I suppose that Code: lat = "43:41.929" lon = "-79:26.5548" but this is the same as Code: lat = 43.6988297 lon = -79.4425964 When you have 43:41.929, this is the same as 43° 41.929', so you need to convert it into decimal value. In fact, if I tell to you "an hour and an half", you can write "1:30" or "1.5" (it's the same !!) So, you need to convert 1:30 to 1.5 !!! How to do it ?? Very simple !! Take the value after ":" (in your case is 41.929) and divide by 60, that is 0.6988 Add the value before ":", and your decimal coords will be 43.6988 Same with lon -26.5548 / 60 + (-79) = -79.4426 Best regards Sergio P.S.: Belgravia Ave ??
merlin2049er Well-Known Member Licensed User Longtime User Sep 10, 2014 #20 Yes, exactly. Thanks for the lesson. Upvote 0