Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow user to specify their location for local radio #4

Open
kingosticks opened this issue Feb 24, 2014 · 3 comments
Open

Allow user to specify their location for local radio #4

kingosticks opened this issue Feb 24, 2014 · 3 comments

Comments

@kingosticks
Copy link
Owner

Add a config setting to specify the location to use for "local" radio. TuneIn supports a latlon parameter containing a comma separated latitude-longitude pair i.e. http://opml.radiotime.com/Browse.ashx?c=local&latlon=37,118.

@kingosticks
Copy link
Owner Author

The config parameter could take a location name and we can look up the latitude/longitude using https://developers.google.com/maps/documentation/geocoding/?csw=1#GeocodingRequests.
i.e. http://maps.googleapis.com/maps/api/geocode/json?address=London,uk&sensor=false gives

{
   "results" : [
      {
         "address_components" : [
            {
               "long_name" : "London",
               "short_name" : "London",
               "types" : [ "locality", "political" ]
            },
            {
               "long_name" : "United Kingdom",
               "short_name" : "GB",
               "types" : [ "country", "political" ]
            }
         ],
         "formatted_address" : "London, UK",
         "geometry" : {
            "bounds" : {
               "northeast" : {
                  "lat" : 51.6723432,
                  "lng" : 0.148271
               },
               "southwest" : {
                  "lat" : 51.38494009999999,
                  "lng" : -0.3514683
               }
            },
            "location" : {
               "lat" : 51.508515,
               "lng" : -0.1254872
            },
            "location_type" : "APPROXIMATE",
            "viewport" : {
               "northeast" : {
                  "lat" : 51.6723432,
                  "lng" : 0.148271
               },
               "southwest" : {
                  "lat" : 51.38494009999999,
                  "lng" : -0.3514683
               }
            }
         },
         "types" : [ "locality", "political" ]
      }
   ],
   "status" : "OK"
}

@kingosticks kingosticks added this to the v0.2 - Customisation milestone Feb 24, 2014
@kingosticks kingosticks removed their assignment Feb 24, 2014
@yonailo
Copy link

yonailo commented Aug 26, 2015

I am running the latest version of the plugin, but my local radio entry is empty, do you know why ? how can I fix it ?

@djmattyg007
Copy link
Contributor

It's worth noting that Google's geolocation APIs should now essentially be considered non-free. Any non-trivial usage is likely to get heavily rate limited. It would likely be significantly easier to just accept latitude and longitude, and link to a guide for how the user can obtain those values themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants