Choose your OS and look for the ‘Site configuration’ folder. Find this folder on your OH box. Within this folder there should be a ‘html’ directory, within that directory create a sub directory ‘google-maps’ and place the ‘maps.html’ here.
Then your path in the settings of the widget should be ‘/static/google-maps/map.html’ .
So you would like multiple calculations. Would you want all routes to be printed on the widget? That could get confusing. I’m thinking about creating a seperate widget just for travel time calculations, no map.
No no, that’s not the issue. I’m well aware where the html folder is on my PI and the files have been correctly placed there.
I meanwhile found the issue and have been able to fix it. Don’t ask me why or how, but it was related to the HabPanel storage configuration. I use the configuration which is saved on the server (so no local storage).
I first tried the widget on a different client with the server configuration. That didn’t work.
I then switched to local storage (which was empty as it was a different client), and then it the widget worked!
I then used my own pc again on server configuration, which again didn’t work
I then switched my own pc to local configuration, which was not empty yet. I deleted the local storage configuration and cleared the cache from my browser. Then tried the widget again from the local configuration and it worked
Then finally switched again to server configuration and now it worked
–> So basically, as far as I could tell, there was an existing local configuration on my PC which seemed to cause a conflict.
@danielwalters86 : You should try this yourself: go to local configuration, clear it completely (including wiping all the cache), and then switch to server configuration again.
I m also interested in getting travel time calculations with/without traffic + best route suggested inside OpenHAB.
But that looks more like a good candidate for a new binding than just a HABpanle widget.
This way travel times can be used in rules and trigger other items.
What do think?
Bye
Massi
Appreciate that your post was to illustrate a point but I wouldn’t advocate calling the Google Maps API three times like that - it’s unnecessary and continued use like that may eat your usage allowance. I would instead only call it once and then use a rule to extract the relevant bits using JSONPath and call postUpdate.