Google Weather
ExpressionEngine 1.x, ExpressionEngine 2
Back to this add-on's main page
View Other Add-ons From Marcel Villerius
Latitude/Longitude is possible
General
JCDerrick
|
Posted: 27 June 2011 03:08 PM |
|
|
|
This is just an FYI for anyone looking to use this add-on using lat and long. I think I found a way to do it.
You can parse the lat/long using this format:
location=",,,20715041,-156249704"
My actual lat and long were:
20.715041 and -156.2449704
See this article for more information:
http://stackoverflow.com/questions/2780836/using-google-weather-api-with-lat-and-lon-how-to-format
Now I just have to figure out how to strip the “.” from the lat and long produced by my other add-on.
|
|
|
marcel
|
Posted: 28 June 2011 05:36 AM |
# 1
|
|
Developer
|
Hi JC,
That’s a nice suggestion! Thanks to the stackoverflow article I think I can add it to the extra. I’ll let you know when it is added.
Regards,
Marcel
|
|
|
JCDerrick
|
Posted: 28 June 2011 09:27 AM |
# 2
|
|
|
That’d be great Marcel. Especially if you could find a way to do it where we could leave the “.” in the lat/long. I’ve found it’s hard to remove that without using the find/replace add-on. Thanks for your work on this.
|
|
|
Davor
|
Posted: 28 June 2011 11:41 AM |
# 3
|
|
|
+1
this would be nice!
|
|
|
marcel
|
Posted: 01 July 2011 12:07 PM |
# 4
|
|
Developer
|
Hi,
I’ve done several tests with latitude an longitude data but the Google Weather API does not appear to be consistent with the data. There is no logic to discover what the API does accept or not.
I added the functionality in version 1.06 and 2.06 without any warranty, so it can be tested. You can use it with decimal data, like this:
{exp:google_weather language=“nl” latitude=“44.06193297865348” longitude=”-121.27584457397461”}
{current_icon}
{/exp:google_weather}
Latitude and longitude will override ‘location’.
|
|
|
JCDerrick
|
Posted: 01 July 2011 12:17 PM |
# 5
|
|
|
Thanks again Marcel, I’ll give this a try and see how it works. The weird part about the Google API was the fact it had to be like 7-8 characters long (without the decimal). It was indeed quite strange.
|
|
|
marcel
|
Posted: 06 July 2011 06:28 AM |
# 6
|
|
Developer
|
I reposted the original plugin on Devot-ee, because the version with Latitude/Longitude wasn’t working as it should. The modified version is still available on the plugin webpage.
I’ll will work on it after my vacation. Any suggestions are always welcome.
|
|
|