Google Maps widget with traffic

me too. The frame just displays the first HABpanel dashboard.

I there any input/solution?

EDIT:
This issue is solved. I fogot to edit the parameters directly in widget placed on a dashboard…

Do you have the same when the widget is placed on a dashboard?

Hi Guys! Great plugin, however I get the error:

Directions request failed due to NOT_FOUND

everytime I start it up.
I googled this Error msg and found that it is caused bye the maps API not knowing the Start and End Location. However, this also happens if I try any locations (like generic “Berlin” to “Hamburg”)

Any Idea?

edit: I figured it out!

  1. I should not set a zoom level :slight_smile: if i want distances
  2. Seems like you dont support german letters: ä;ö;ü (Köln) for example does not work!
  3. MOST IMPORTANT: You dont support “ß” - common in “Straße” which… you guessed right, translates to “Street” :smiley:
    Example locations that do not work:
    “Von-Werth-Straße+240,+50259+Pulheim”
    “Anystreet, Köln”

Hi sceppi!

Can you give me your full entry in “Server Path” at the configuration panel?

My issue: I can not reach my map.html !

What I`ve done:

  • http-binding installed DONE
  • map.html copied to /etc/openhab2/html/google-maps/ DONE
  • switched to local config > delete browser cache > changed back to server config DONE

I’m using openHABIAN openHAB 2.2.0-1 (Release Build)

Thx
Charlie

Can you give me your full entry in “Server Path” at the configuration panel?

/static/google-maps/map.html

Nice work! This is going to go well with the Alexa control binding in development (here) to also yell at me if my estimated commute is running long :slight_smile:

1 Like

Use GPS coordinates instead.

example:
https://maps.googleapis.com/maps/api/distancematrix/json?origins=50.964546,6.7974744&destinations=50.9562823,6.7803137&language=SE&departure_time=now&traffic_model=best_guess&mode=driving&key=YOURAPIKEY

@bastiaan_van_h,
Hello, how would I go about choosing my mode of transport.
I would like to be able to choose between public transport, car and bicycle
Thanks

If you can code, adjust the ‘maps.html’ on line 180 to transit, driving, walking or cycling.

Hi all, Awesome widget!!!

Trying to get this to work but the map loads and then right away disappears and gives me this error:

Sorry! Something went wrong.
This page didn’t load Google Maps correctly. See the JavaScript console for technical details.

Any idea’s ?

1 Like

Thanks, I can code quite a bit but I have never really delved into html unfortunately.
I can see the setting on line 180, that’s quite straightforward but I was thinking of adding it in the configuration settings of the widget. How would I go about doing that?

Hey guys,

I’m a little lost and hope you can help me. I really like that widget but somehow I can’t make it run. I have the same issue as sceppi and tailor. When I start that widget it just shows my dashboard

What I have done so far:

  • Install the widget according to Bastiaan’s instructions
  • Install the http-binding in the Paper-UI
  • Set parameters: (heigth = 600, serverpath: OPENHABIANPI:8080/static/google-maps/map.html, gm_zoomlevel = 12, gm_latitude = 48, gm_longitude = 10, gm_travel --> toggeled off, gm_apikey = xxx)
  • check if map.html is accessible using the server path shown above. When I enter the path in the browser the following is shown:
  • Additionally I changed the storage to “local” > deleted the browser cache > changed back to the server config --> negative
  • Make sure that the API-key is right with another html-code > successfull, API-key works

No matter what i do - the widget won’t work. I hope you can help me with that issue. Thank you very much in advance!

Best regards

Hi

Have you changed the parameters in the widgetsettings after you added it on the dashboard?

Hey Sintei.

I can see you are using language SE. Do you get the output like Hours and Minutes or do you get that in swedish?

image

As you can see here, if I wanted that text in my own language do you or anyone know how to change that?
My language is set language=ge and also tried with GE - no difference.

Fantastic widget !

Would love to see it done with WAZE - though I’m struggling a bit to get there. I’m a total noob in coding and fully relying on other people’s work witch I then try to convert- the trial and error road, is a bit like Tour de France :upside_down_face:

WAZE have an advantage in “right now “ happening on the roads due to other users on the road who can send “as is “ messages to the server/ other users. Where maps seems to depend on statistics… funny since they are both in the google family…

Google maps depends on statistics but is also “real time” and has far more real time data going into it than waze.

You could probably just display the live map in an iframe. More info

I’m aware of that google maps also use real-time data. The thing is that the so-called real time at maps is depending on many users where one single wazer who report at stand still or any other incidents, that report will show up on my map… That feature is second to none when dealing with rush hour traffic. So where I now check the app when in car I would love to get an update with coffee in hand in the kitchen. :wink:

wahay… that would be the thing…
can’t be that hard to find a widget that could be modified-or maybe it’s now where I try starting from scratch … thanks for the heads up !

Exactly; see here: