api for getting my location.

These forums are specific to the Waze mobile app. Post here if you experienced a problem while using the app, have a question about the app functionality or a feature such as navigation or search.

Moderators: krankyd, Unholy

Re: api for getting my location.

Postby dknight212 » Tue Feb 11, 2014 10:23 am

There is no API for providing the location from Waze, though you might be able to hack something together using the share my drive feature. Alternatively, if you're on Android then something like Tasker will be able to help determine your position and notify your server in some way. I'm sure there must be alternatives on the other OSs.
David (not Dave!) Knight • Samsung Galaxy Note 2 (CM10.1.3) • Android 4.3 • Waze (whatever is latest)
Area Manager for LondonUK Country Admin
UK links: UK WikiUK ForumWaze UK on FacebookBecome a UK Area ManagerWaze Status
dknight212
Waze Global Champs
Waze Global Champs
 
Posts: 4848
Joined: Sun Apr 24, 2011 9:21 am
Location: London, UK
Has thanked: 448 times
Been thanked: 561 times

Re: api for getting my location.

Postby dknight212 » Tue Feb 11, 2014 12:38 pm

There is likely to be a delay of a few minutes due to privacy reasons, I'm sure you'd be better off with the phone itself initiating a location report to your server.
David (not Dave!) Knight • Samsung Galaxy Note 2 (CM10.1.3) • Android 4.3 • Waze (whatever is latest)
Area Manager for LondonUK Country Admin
UK links: UK WikiUK ForumWaze UK on FacebookBecome a UK Area ManagerWaze Status
dknight212
Waze Global Champs
Waze Global Champs
 
Posts: 4848
Joined: Sun Apr 24, 2011 9:21 am
Location: London, UK
Has thanked: 448 times
Been thanked: 561 times

Re: api for getting my location.

Postby dknight212 » Tue Feb 11, 2014 3:27 pm

I'm not even sure all users are provided by the live map feed.

Edit: I'll get someone who knows these things to post.
David (not Dave!) Knight • Samsung Galaxy Note 2 (CM10.1.3) • Android 4.3 • Waze (whatever is latest)
Area Manager for LondonUK Country Admin
UK links: UK WikiUK ForumWaze UK on FacebookBecome a UK Area ManagerWaze Status
dknight212
Waze Global Champs
Waze Global Champs
 
Posts: 4848
Joined: Sun Apr 24, 2011 9:21 am
Location: London, UK
Has thanked: 448 times
Been thanked: 561 times

api for getting my location.

Postby leifnei » Tue Feb 11, 2014 10:09 am

Is there a way to get my approximate location for an external server on the internet?

I can make a script to reroute my office deskphone to my home deskphone, but I'd like to be able to determine by querying waze server, if I'm somewhere near office or home.

A margin of 50km is good enough :-)

I'm always using waze; my speedometer is deliberately lying to me, even when the OBD-readout is true.
leifnei
 
Posts: 63
Joined: Sat Jul 09, 2011 2:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: api for getting my location.

Postby leifnei » Tue Feb 11, 2014 12:07 pm

I think I can hack something together with getting the data sent to the live map webpage:

https://www.waze.com/row-rtserver/web/G ... 2119958550

It returns a nice json, with the location of users:

{"fleet":"none",
"id":"user-477349956/b02a540ec273-45c9-9253-02334400aeb2",
"inscale":true,
"speed":25.35386477446572,
"location":{"y":55.609500000000004,"x":12.3165},
"ingroup":false,
"addon":3,
"mood":1,
"userName":"guest",
"ping":1,"magvar":0},

I just have to find my own userid; I guess I have to start making requests and store the response, and then make a drive to see if I show up in the response; there is noone in my area now.
leifnei
 
Posts: 63
Joined: Sat Jul 09, 2011 2:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: api for getting my location.

Postby leifnei » Tue Feb 11, 2014 2:56 pm

A delay does not matter, the phone doesn't ring that much.
I don't want to have to remember to start yet another app on my phone, then I might as well rember to press a few buttons on my home desk-phone.
Simply: If I pass through area X between 8 and 9 am, do not relay work calls to my home phone.

But the big question: is my userid in this output constant? I'm not sure, having analyzed half an hour of data while I was out driving.
leifnei
 
Posts: 63
Joined: Sat Jul 09, 2011 2:34 pm
Has thanked: 0 time
Been thanked: 0 time

Re: api for getting my location.

Postby Timbones » Tue Feb 11, 2014 4:14 pm

I don't think you can rely on Waze being able to provide you with useful location information.
There are other services that will be more reliable/useful.

Which OS is your phone on? Where is your script going to be running? Are you behind a firewall?

Two suggestions:
  1. Setup app like Tasker on phone to (automatically) notify your script about its location. Monitoring which Wifi network is connectect will probably enough. When you leave home (disconnect from Wifi), your mobile will tell your script at work to redirect.
  2. Have the script monitor your Work wifi network, and when it sees your mobile phone appear on it, redirect the telephone.
Timbones(6) • UK Country Admin & Coordinator • Forum Moderator • Beta Editor and Routing Expert
Scripts: WME Colour Highlights v1.8 (Feb 2014)WME Route Tester
Timbones
Waze Global Champs
Waze Global Champs
 
Posts: 3676
Joined: Wed Feb 09, 2011 10:33 am
Location: York, UK
Has thanked: 181 times
Been thanked: 626 times


Return to Waze App

Who is online

Users browsing this forum: Giorala, Google [Bot]