[Finished] Improvement suggestion for Weather Plugin (1 Viewer)

offbyone

Development Group
  • Team MediaPortal
  • April 26, 2008
    3,982
    3,703
    Stuttgart
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #1
    I'd like to propose that we try to find the user's location automatically when there are no locations yet set yet. Makes the start and run experience even greater ;)

    How?
    Simply call:
    http://freegeoip.net/json/
    and extract the city from the json data and get the weather condition for that.
     

    Edalex

    Community Plugin Dev
  • Premium Supporter
  • January 3, 2008
    2,927
    1,233
    Saratov
    Russian Federation Russian Federation
    Country flag
    Is it okay to have empty city? :(
    Code:
    {"city": "", "region_code": "", "region_name": "", "metrocode": "", "zipcode": "", "longitude": "100", "latitude": "60", "country_code": "RU", "ip": "...", "country_name": "Russian Federation"}
     
    Last edited:

    chefkoch

    Retired Team Member
  • Premium Supporter
  • October 5, 2004
    3,130
    1,630
    Dresden / Munich / Maastricht
    Germany Germany
    iirc there is already a mantis issue to have a default city if nothing is set. This information could be attached there.

    I like the idea a lot, but it should be reliable.
    If the city from the web service is empty we could fall back to one or more cities of the timezone which us configured or a few 'big cities' or famous places.... Everything is better than nothing ;)
     

    offbyone

    Development Group
  • Team MediaPortal
  • April 26, 2008
    3,982
    3,703
    Stuttgart
    Germany Germany
    Country flag
    • Thread starter
    • Moderator
    • #4
    Seems like that service hasn't mapped Russia yet :p
    We should try to find a good one (someone know if we can get that info from Google? - They must have the biggest DataBases).
     

    kiwijunglist

    Super Moderator
  • Team MediaPortal
  • June 10, 2008
    6,746
    1,750
    New Zealand
    New Zealand New Zealand
    Country flag
    I tried freegeoip
    {"city": "", "region_code": "", "region_name": "", "metrocode": "", "zipcode": "", "longitude": "174", "latitude": "-41", "country_code": "NZ", "ip": "111.69.XXX.XXX", "country_name": "New Zealand"}
    Country (New Zealand) is correct, but city (Christchurch) is blank, and longitude + lattitude is too far off to be useful (about 500km off, co-ordinates land me in the pacific ocean)
     
    Last edited:

    Users who are viewing this thread

    Similar threads

    Top Bottom