I really like the weather module, and I've just noticed that the weather stations all have lat/long coordinates, so I think I could cook up an interface to a geolocation service (with Maxmind's mod_geoip as a starting point) to provide a "local weather" block that displays the closest station data.

Before I start hacking about, is this already something in the works?

Comments

toddy’s picture

Hi,

yes, this is already implemented in the Drupal 7.x version of the module. If you'd like to backport this for D6, I'm happy to accept your patches. Currently, I'm using the data from hostip.info for that block. However, I'm thinking about depending on a Geolocation module which does the IP-to-Location translation for the weather module. I'm currently investigating which one of the numerous modules might be a good candidate. See e.g. #402546: Functionality overlap with ip2cc module for a discussion between two module maintainers.

Regards,
Tobias

jmbarlow’s picture

Thanks, Tobias.

I'll have a look at the D7 tree and see if I can do something useful.

I had mixed results with the various geoip modules available for Drupal [I haven't looked again in the last six months] so for my requirements, I used the mod_geoip apache include with the free Geolite City dataset. See http://www.maxmind.com/app/geolitecity.

I'd be interested to know whether you give any of the current iterations of geoip modules a thumbs up.

Regards,

JMB

jkdaza’s picture

Hi guys

Still interested in this?

What about using the geoip API?

Brett Bierman’s picture

StatusFileSize
new12.74 KB

We're using the SmartIP module on a D6 site we're currently building and needed the weather block per user's location based on IP.

I've patched the D6 weather module to pull latitude/longitude data from SmartIP and produce a weather block for the user based on their IP. I went ahead and looked at the D7 version and backported it's method for doing this as well, so SmartIP is optional.

I also added a method to return the display for the block when it is being built from latitude/longitude values as this seemed to be being duplicated many times.

Brett Bierman’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, weather-user-locations-757650-1.patch, failed testing.

ajsoles’s picture

Title: Local weather block for anonymous users » METAR data
Version: 6.x-5.11 » 7.x-1.x-dev
Component: User interface » Code
Category: feature » bug

METAR data not translating to plain English for Canadian airports.

toddy’s picture

Title: METAR data » Local weather block for anonymous users
Version: 7.x-1.x-dev » 6.x-5.11
Component: Code » User interface
Category: bug » feature

Please do not hijack issues.

alpp’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, weather-user-locations-757650-1.patch, failed testing.

alpp’s picture

for anyone who is interested in this feature for 6.x version. the patch above works perfectly well. i don't know why it fails in the auto test but i did modify the file according to the patch and it worked just as it was meant to be. great feature indeed. thanks for sharing.

knalstaaf’s picture

Version: 6.x-5.11 » 7.x-1.1

Looks like a great job. Will there be a D7 version as well?

toddy’s picture

Assigned: Unassigned » toddy
Status: Needs work » Fixed

This is now available in the current release.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.