• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Module to show local traffic information - UK

Scheduled Pinned Locked Moved Requests
8 Posts 3 Posters 3.4k Views 3 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    nickb23
    last edited by Mar 7, 2017, 11:24 PM

    Hey guys, I know that there is a module to show traffic on a specific route, but it would be nice to have a module that showed traffic information for a specific area. For example putting in a post code and then a distance, and getting traffic updates for that. I know that Waze is open source, and shares the traffic data it has, but I don’t know the first thing about making a module. Anyone got any ideas on how to implement this?? Thanks guys. Nick

    O 1 Reply Last reply Mar 7, 2017, 11:45 PM Reply Quote 0
    • O Offline
      onetwankyfive @nickb23
      last edited by Mar 7, 2017, 11:45 PM

      @nickb23 I was able to achieve this with MMM-iFrameReload and an html file in that folder… It looks something like this.

      {
      module: ‘MMM-iFrameReload’,
      header:‘Traffic Map’,
      position: ‘top_right’, // This can be any of the regions.
      config: {
      // See ‘Configuration options’ for more information.
      url: “http://localhost:8080/modules/MMM-iFrameReload/nameofhtmlfile.html”,
      width: “580px”, // Optional. Default: 400px
      height: “1100px”, // Optional. Default: 800px
      refreshInterval: 600 //Optional. Default: 3600 = 1 hour
      }
      },

      with this code below to make the map and save the html in the iframe folder

      https://developers.google.com/maps/documentation/javascript/examples/layer-traffic

      1 Reply Last reply Reply Quote 0
      • N Offline
        nickb23
        last edited by Mar 8, 2017, 12:47 PM

        thanks for the reply. Looks very promising. Do you know if it is also possible to have a test version of all traffic in a local area as well?

        Nick

        1 Reply Last reply Reply Quote 0
        • F Offline
          Fonfon
          last edited by Fonfon Mar 9, 2017, 9:42 PM Mar 9, 2017, 9:40 PM

          looks like very nice !! this module work ?

          1 Reply Last reply Reply Quote 0
          • O Offline
            onetwankyfive
            last edited by Mar 9, 2017, 9:52 PM

            it has worked fine for me

            1 Reply Last reply Reply Quote 0
            • F Offline
              Fonfon
              last edited by Fonfon Mar 10, 2017, 10:57 PM Mar 9, 2017, 10:18 PM

              black screen when i add this:

              {
              module: ‘MMM-iFrameReload’,
              header: ‘Traffic Map’,
              position: ‘top_right’, // This can be any of the regions.
              config: {
              // See ‘Configuration options’ for more information.
              url: ‘http://localhost:8080/modules/MMM-iFrameReload/nameofhtmlfile.html’,
              width: ‘580px’, // Optional. Default: 400px
              height: ‘1100px’, // Optional. Default: 800px
              refreshInterval: 600 //Optional. Default: 3600 = 1 hour
              }
              },
              Can i use for my html file the same api key than MMM-traffic ?

              1 Reply Last reply Reply Quote 0
              • O Offline
                onetwankyfive
                last edited by Mar 14, 2017, 6:29 PM

                it looks like you have single quotes where double quotes are needed… as for the api key you can test it by substituting the url with one from another site.

                1 Reply Last reply Reply Quote 0
                • F Offline
                  Fonfon
                  last edited by Fonfon Mar 14, 2017, 10:43 PM Mar 14, 2017, 10:06 PM

                  Thanks for your help I found my 2 errors with the "
                  and i didn’t activate javascript api map in google.

                  1 Reply Last reply Reply Quote 0
                  • 1 / 1
                  1 / 1
                  • First post
                    3/8
                    Last post
                  Enjoying MagicMirror? Please consider a donation!
                  MagicMirror created by Michael Teeuw.
                  Forum managed by Sam, technical setup by Karsten.
                  This forum is using NodeBB as its core | Contributors
                  Contact | Privacy Policy