0

I'm trying to geolocate users in a Spotify app. However, I only get back garbage location data from Spotify. The promise doesn't fail, but return an accuracy of -1 and lat/lon of 200/200. Is there some permission that I'm missing? Has anyone successfully integrated this?

The code:

require([
'$api/models',
'$api/location',
'$views/image#Image',
'$views/list#List'
], function(models, Location, Image, List) {
'use strict';

var loc = Location.Location.query();
    loc.load('latitude', 'longitude', 'accuracy').done(function() {
    console.log('Found you!', loc.latitude, loc.longitude);

      window.theLocation = loc;
    }).fail(function(loc, error) {
      console.log("I failed!", error)
    });
...

The console:

Found you! 200 200
theLocation.accuracy
-1
theLocation.latitude
200
theLocation.longitude
200

EDIT: See my follow-up question here: What method(s) can I use for geolocation through a Spotify app?

Community
  • 1
  • 1
Dan Mandle
  • 5,608
  • 3
  • 23
  • 26

1 Answers1

0

Unfortunately, this isn't supported and shouldn't be in the documentation. We're working on the documentation and this will be removed once it's updated.

Michael Thelin
  • 4,710
  • 3
  • 23
  • 29
  • Please see my follow-up question here: http://stackoverflow.com/questions/20196869/what-methods-can-i-use-for-geolocation-through-a-spotify-app – Dan Mandle Nov 25 '13 at 15:31