The module contains the node location(http://drupal.org/project/location) coordinates (lat/lon) and location.
I want to see the weather in this place in the block yr.no
Is there any possibility of integration?

Comments

tjodolv’s picture

I haven't used the location module myself, but I'll take a look at it.

pvasili’s picture

I think that their integration will be very useful to all

tjodolv’s picture

Assigned: Unassigned » tjodolv
Status: Active » Postponed

This is going to take some time to figure out if, and exactly how, it can be implemented, due to how yr.no deliver their location lookup.

Postponing this to a potential 2.0 release.

tjodolv’s picture

Version: 6.x-1.4 » 7.x-1.x-dev

Hello again. I will get to work on this when I have the time, as the location module seems ready for D7. I will start the work on the 7.x-1.x branch, but the implemetation for 6.x-2.x will be done almost in parallell.

Anonymous’s picture

Maybe it's easier than you think. The location module has methods to determine proximity. It's commonly used to set up location-driven Views that take coordinates as input arguments and displays the node(s) or user(s) with the closest location.

On a side note, to both the maintainer and OP, the "Weather" module does this already. Too bad it only displays current weather and no forecasts.

Anonymous’s picture

#5 of course depends on having added a bunch of weather locations to the system.

Another possibility would be to explore the api of YR. These accept arbitrary coordinate input.

http://api.yr.no/weatherapi/documentation
http://api.yr.no/weatherapi/locationforecastlts/1.0/documentation
http://api.yr.no/weatherapi/locationforecast/1.8/documentation

tjodolv’s picture

Yes, I have started looking at that API now, but I am waiting for an answer from yr.no on how these data are available. The only service listed as free on their website is the one currently in use where you have to input the url of the specific location you want. There have recently been some issues with certain applications requesting far too much data from the lat/long based API, and so they are currently reviewing access to it. But I will absolutely start working on this, because so many people are asking for it.

arru’s picture

I'm taking a stab at this right now; can't find anything about restrictions in the API docs except to credit Yr.no. Look here: http://api.yr.no/lisens.html
But it's always a good idea to keep # of requests down in cases like this. The strategy I'm working the moment is to round the lat/lon to integers or 1 decimal place to produce the YID, which appears to be well within the accuracy of weather prediction. These will then be retrieved and cached the same way as current location-based data.

tjodolv’s picture

Status: Postponed » Closed (duplicate)

Created a new issue where I gathered up all the feature requests.
#1178150: Feature suggestions and requests