Open kingosticks opened 10 years ago
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"
}
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 ?
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.
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
.