• 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.

Trafficmaps

Scheduled Pinned Locked Moved Development
63 Posts 11 Posters 67.3k Views 12 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.
  • W Offline
    wscheer @Jeff
    last edited by Nov 27, 2016, 8:55 PM

    @Jeff yeah. Just replace the xxxx with your API key.

    J 1 Reply Last reply Nov 27, 2016, 9:17 PM Reply Quote 0
    • J Offline
      Jeff @wscheer
      last edited by Nov 27, 2016, 9:17 PM

      @wscheer
      That’s what I did.

      I really don’t know what’s going on.

      Maybe I should just implement it as a final picture

      W 1 Reply Last reply Nov 27, 2016, 9:35 PM Reply Quote 0
      • W Offline
        wscheer @Jeff
        last edited by Nov 27, 2016, 9:35 PM

        @Jeff ok Jeff I have an idea.

        Can you look at your magic mirror page in server only mode again? Then if you right click and “inspect” the broken image you should see the url its trying to reach.

        Compare that to the url I had you copy paste in with your API that worked.

        Then if there is some sort of difference we should be able to track it down.

        J 1 Reply Last reply Nov 27, 2016, 9:41 PM Reply Quote 0
        • J Offline
          Jeff @wscheer
          last edited by Nov 27, 2016, 9:41 PM

          @wscheer
          I found the mistake ;)

          In your maproute.js it says “map_key” not “api_key”.

          W 1 Reply Last reply Nov 27, 2016, 9:44 PM Reply Quote 0
          • W Offline
            wscheer @Jeff
            last edited by Nov 27, 2016, 9:44 PM

            @Jeff omg I’m such a doof. I’ll go back in my previous post and fix that.

            I’m so glad you got it working! I searched for months to find a map like this. I hope you enjoy it :)

            1 Reply Last reply Reply Quote 0
            • Z Offline
              Zoltan @wscheer
              last edited by Zoltan Nov 6, 2018, 4:00 PM Nov 6, 2018, 3:58 PM

              @wscheer
              My map is working and it shows the traffic. I however also have a map that don’t update and tried the Math.random() that you mentioned. The moment i add this to the line my map disappear completely which suggest i broke something. Do i interpret it wrong and can you please advise.

              Like this the code is working fine:

              wrapper.src = ‘http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/-26.0460,27.9790/13?mapSize=500,420&ml=TrafficFlow&key=Asm#####AJWIWc5o8Onf4fhH8O3IEe2e8ZcHaLTBWhx4_BWTvOW4S5xj60MuUJf4’;

              Like this it isn’t working:

              wrapper.src = ‘http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/-26.0460,27.9790/13?mapSize=500,420&pp=Math.random(),Math.random()&ml=TrafficFlow&key=Asm#####AJWIWc5o8Onf4fhH8O3IEe2e8ZcHaLTBWhx4_BWTvOW4S5xj60MuUJf4’;

              S 1 Reply Last reply Feb 9, 2019, 7:01 AM Reply Quote 0
              • S Offline
                strawberry 3.141 Project Sponsor Module Developer @Zoltan
                last edited by Feb 9, 2019, 7:01 AM

                @zoltan try the following:

                wrapper.src = 'http://dev.virtualearth.net/REST/v1/Imagery/Map/Road/-26.0460,27.9790/13?mapSize=500,420&pp=' + Math.random() + ',' + Math.random() + '&ml=TrafficFlow&key=Asm#####AJWIWc5o8Onf4fhH8O3IEe2e8ZcHaLTBWhx4_BWTvOW4S5xj60MuUJf4';
                

                This way you use the actual value and not Math.random() as a string.

                Please create a github issue if you need help, so I can keep track

                Z 1 Reply Last reply Feb 11, 2019, 5:28 AM Reply Quote 0
                • Z Offline
                  Zoltan @strawberry 3.141
                  last edited by Feb 11, 2019, 5:28 AM

                  @strawberry-3-141 said in Trafficmaps:

                  http://dev.

                  Thanks very much. You are a legend. It’s finally working after me trying everything that I could think of.
                  One of my biggest mistakes was I started with “http:// and ended with jf4”; which works fine without the Math.random. Clearly ‘ was the way to go and not “.

                  S 1 Reply Last reply Feb 12, 2019, 8:45 PM Reply Quote 0
                  • S Offline
                    strawberry 3.141 Project Sponsor Module Developer @Zoltan
                    last edited by Feb 12, 2019, 8:45 PM

                    @zoltan ' and " makes no difference. Your problem was, that you didn’t seperate the function call Math.random() from the link as text. So you literally had Math.random() in your link.

                    Please create a github issue if you need help, so I can keep track

                    Z 1 Reply Last reply Feb 15, 2019, 4:55 PM Reply Quote 0
                    • Z Offline
                      Zoltan @strawberry 3.141
                      last edited by Feb 15, 2019, 4:55 PM

                      @strawberry-3-141 Ok, then it was me chasing ghosts again lol. I really appreciate the help and advice, thanks.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 6
                      • 7
                      • 6 / 7
                      • First post
                        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