Armax / Pokemon-GO-node-api

Pokemon GO api node.js library
MIT License
875 stars 198 forks source link

Pokeio.SetLocation( .... ) / Error: Coords object missing #189

Closed koasmsm closed 8 years ago

koasmsm commented 8 years ago

Hi, I just tried to set a new location (coords) and it doesn't work as expected. The object I passed to the function:

var location = { type: "coords", name: "", latitude: 55.654122, longitude: 12.497218, altitude: 0 }

Pokeio.SetLocation(location, function(error, coordinates) { .... }

Error: Coords object missing at Pokeio.self.SetLocation (..\pokemon-go-node-api\poke.io.js:563:25) at ..\example.js:52:4 at ..\pokemon-go-node-api\poke.io.js:176:11 at ..\pokemon-go-node-api\poke.io.js:217:14 at Request._callback (..\pokemon-go-node-api\poke.io.js:148:16) at Request.self.callback (..\request\request.js:187:22) at emitTwo (events.js:106:13) at Request.emit (events.js:191:7) at Request. (..\request\request.js:1044:10) at emitOne (events.js:96:13)

This happens just when I pass coordinates instead of a location name.

nathanaelnsmith commented 8 years ago

Pass lat/ long in a coords object.

"coords": { latitude: , longitude: }