Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

View Waze Incidents on the Tesla browser

This site may earn commission on affiliate links.
This one:

Code:
http://teslawaze.azurewebsites.net/

Well done!

upload_2016-10-14_16-36-31.png
 
Hi,

So it looks like a clean merge might be a ways off...

Until I can figure out how best to cleanly merge and test everything, I put ericwol@'s version in a separate url:

Waze for Tesla Incidents


It looks like most browsers these days balk at unsecure webpages that use geolocation. To preview in your desktop browser use https (note this doesn't work in the Tesla browser due to its lack of support for SNI):

Waze for Tesla Incidents


Note the trailing slashes in both URLs.
 
Are you guys using the script as-is? I can't, for the life of me, get it to work properly.

I can get the map displayed, but it won't show the car icon or direction indicator and won't auto-refresh. I'm sure it's something with my setup, but I can't figure out what it is, so I'm wondering if any changes were made when you guys put it online that already have it working?

The console is throwing an error: Uncaught ReferenceError: autoUpdate is not defined in waze.js, line 658

If I take the waze.js script from one of the other working sites, that line is gAutoUpdate instead of autoUpdate ...

However, that leads to another error - waze.js is looking for proxy.php in the parent directory ... what is in proxy.php and why is it calling it? Can you include that in the zip file or point to where to get it?
 
Last edited:
@ericwol,

Awesome upgrade of this app. I downloaded your package and hosted it on my development server. Unfortunately, I'm running into some issues in the car.

When the site loads, I get the zoom in/zoom out icons and settings icon on the screen, then the app begins to load the Google map tiles. You can see very briefly that 2-4 of them get loaded, then the screen goes to an "Oops, something went wrong. The Google map tiles could not be loaded, see the Javascript console for details."

Could you look into why that may be happening? I'm running Tesla firmware 2.36.108 (v8.0 initial release) in the car.

That's because you aren't using your own Google Maps API key. You are using the one that's already in the package and it's locked to certain domains (presumably) ... so change the API key to your own and it should start working. I had the same problem at first.
 
Are you guys using the script as-is? I can't, for the life of me, get it to work properly.

I can get the map displayed, but it won't show the car icon or direction indicator and won't auto-refresh. I'm sure it's something with my setup, but I can't figure out what it is, so I'm wondering if any changes were made when you guys put it online that already have it working?

The console is throwing an error: Uncaught ReferenceError: autoUpdate is not defined in waze.js, line 658

If I take the waze.js script from one of the other working sites, that line is gAutoUpdate instead of autoUpdate ...

However, that leads to another error - waze.js is looking for proxy.php in the parent directory ... what is in proxy.php and why is it calling it? Can you include that in the zip file or point to where to get it?

proxy.php is a proxy to the waze REST API. The API does not support CORS (Cross-Origin Resource Sharing).
Attached is my ASP.net version of the proxy.
 

Attachments

  • proxy.zip
    929 bytes · Views: 54
Hi,

So it looks like a clean merge might be a ways off...

Until I can figure out how best to cleanly merge and test everything, I put ericwol@'s version in a separate url:

Waze for Tesla Incidents

Here is the link so that you can type it in the cars browser.
Code:
http://teslawaze.azurewebsites.net

It looks like most browsers these days balk at unsecure webpages that use geolocation. To preview in your desktop browser use https (note this doesn't work in the Tesla browser due to its lack of support for SNI):

Note the trailing slashes in both URLs.

I added code to the webpage so that it redirects to the https version if you are not using the Tesla browser.
The Tesla browser can handle both the http and https version with no problems (I see no issues).
Also including the trailing slash makes no difference loading the page in the Tesla browser.
 
Ok, I added a few more features.


Wind Direction & Speed

This feature is off by default. You need to enable it in the options dialog
View media item 116184
The wind direction is now overlayed on the car icon.
View media item 116183
And the wind speed is shown in the info box
View media item 116182
Waze Outside Of The US

Tesla Waze app now supports the international Waze server.
View media item 116185
Same URL as before:
Code:
http://teslawaze.azurewebsites.net

--Eric
 
Ok, I added a few more features.


Wind Direction & Speed

This feature is off by default. You need to enable it in the options dialog
View media item 116184
The wind direction is now overlayed on the car icon.
View media item 116183
And the wind speed is shown in the info box
View media item 116182
Waze Outside Of The US

Tesla Waze app now supports the international Waze server.
View media item 116185
Same URL as before:
Code:
http://teslawaze.azurewebsites.net

--Eric
Thanks!
 
@fact200
@ericwol

- guys put up a paypal donate link or similar
- I feel the need to thank you guys for your excellent work that I enjoy on a daily basis.

only a modest donation mind you ;-)
but if a bunch of us do this it may help you feel your efforts are worthwhile and perhaps help with the hosting costs at least.
+1

One question: upon starting my car, the page is all white (not working). I usually have to refresh the page for it to work again. Is this unique to me, or can it be overcome?