[Script] Live Map UR Layer v2.24 (20160202)

Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Moderators: Unholy, bextein

Forum rules
Discussion for the unofficial, community-developed addons, extensions and scripts built for the Waze Map Editor.

DO NOT START a new thread unless it is about a new idea. Keep discussion of existing tools within the main thread for that tool.

The official index of these tools is the Community Plugins, Extensions and Tools wiki page.

Re: [Script] Live Map UR Layer v2.15 (20141122)

Postby Twister-UK » Sat Nov 22, 2014 11:27 pm

You're on the livemap site, right?
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.15 (20141122)

Postby Twister-UK » Sat Nov 22, 2014 6:24 pm

Thanks to a late night hackathon, 2.15 has turned up a bit sooner than expected...

Getting the routine changes out of the way first:

  • Added filter for URs with/without descriptions.
  • Master enable state is saved between sessions.
  • JS console debug output can be toggled on or off by clicking the version number at the top of the LMUR UI - when output is enabled "(dbg)" is shown after the version.

And now for the biggie.

Major reworking of the data retrieval code...

The LMURs of old would try to request as much data as possible in a single trip to the server (which translated into requests for blocks of data spanning a 1x1 degree area of the map), and would also perform all the required requests in a single tight loop, locking out the rest of the script until all the data had been received. With the growth in the amount of data required to service both the existing UR/MP filtering, plus the significant extra data now required for PUR filtering, this "big hit" approach to data retrieval was starting to struggle, with retrieval errors becoming more frequently experienced by more users.

2.15 adopts a two-pronged approach to this problem. Firstly, and quite sensibly, the data requests are now made for much smaller blocks at a time - 0.2x0.2 degree areas. This cuts down the amount of data returned in each request, making it more likely that the server will be able to return something other than an error. Secondly, each block request is now placed in a download queue, so that the required blocks can be streamed back and processed on an as and when available basis, leaving the script free to do other stuff in the meantime.

The most obvious evidence of this change is that, if you're viewing an area of the map wider/taller than 0.2 degrees, you'll now see each block rendered as it arrives, rather than (as in previous versions) seeing no change at all until everything had been downloaded and then having the whole screen change at once.


It's not all entirely sweetness and light however, as the UI is momentarily blocked each time one of the chunks is returned from the server and LMUR runs its rendering task, so if you notice the occasional click not being registered, or the occasional popup not, umm, popping up, then it's almost certainly because the render task is doing its thing. On my two development systems it doesn't cause any real problems, so I'm hoping it'll be acceptable for other users too - now I've got the new streaming code in place I'll look into improving this behaviour, but with all the problems the older "big hit" retrieval code is now causing, I wanted to release the streaming code as soon as I was happy with its core performance, and worry about the UI side of things later on...

The other glitch I'm aware of and intend to fix sooner rather than later is that enabling any of the script sections, or the master enable itself, doesn't intitiate the data download required to show any of the newly-enabled items - you'll have to persuade the download to begin by dragging or zooming the map view.


Given how much of the core code has been modified with this release, I'd really appreciate as much feedback as possible, especially comparing the networking performance of 2.15 against the previous releases. I fully expect there to be a fair bit of fine-tuning required before it's working nicely for everyone, but I hope the performance is good enough for you all to see the potential of this redesign. Having spent the last week or so living with this code as it went through pre-release shake down, I certainly wouldn't want to go back to the pre 2.15 way of doing things...


Firefox+Greasemonkey version: https://greasyfork.org/scripts/1948-livemap-ur-overlay
Chrome Web Store version: https://chrome.google.com/webstore/deta ... niefljookp
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.14 (20141029)

Postby Twister-UK » Wed Nov 19, 2014 12:14 am

Just a quick status update to say that despite the best efforts of RealLifeTM to minimise the amount of time I've had to spend on Waze this month, some progress has been made towards fixing the performance issues, however it's probably safe to assume there won't be a release until some time next month...
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.14 (20141029)

Postby Twister-UK » Fri Nov 07, 2014 3:05 pm

Unfortunately yes. I did look at loading only the data required for the current settings, but the way the code handles its internal data cache was written back when there wasn't really a problem loading everything up front regardless, so having different bits of data loaded at different times depending on when the user enables/disables each display mode would have meant rewriting the caching code to allow partial reloads.

Essentially this is what I'll end up having to to anyway, but as noted above it's a fairly major upgrade of the code, so although the present code is far from optimal it did at least seem to work well enough to be released into the wild...
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.14 (20141029)

Postby Twister-UK » Fri Nov 07, 2014 12:56 pm

Re your point about it trying again when you click OK, this isn't the case - if a block fails to download then LMUR moves onto the next block in the list, so if you're seeing multiple error messages it means the server has failed to serve up multiple different blocks.

Once you've clicked through all the errors for a given set of download requests, LMUR shouldn't then attempt any further downloads unless you move the map beyond the bounds of the already cached data area (i.e. the yellow-highlighted region), or it attempts an auto-refresh of the central block in the current view - this occurs every 300 seconds - so users shouldn't end up being prevented from manually unticking the enabled box.
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.14 (20141029)

Postby Twister-UK » Fri Nov 07, 2014 12:40 pm

This problem has always been lurking in the background ready to strike at times when the Waze servers are bogged down, but it now seems to have been exacerbated by the introduction of PUR support, as each server request is now pulling down a hell of a lot more data than almost ever used to be the case - even in areas where URs are spreading like measles, chances are they're still outnumbered by the sheer volume of PURs being generated now.

Looks like I'm going to need to rewrite the server request code to spread the load a bit more evenly across the whole LMUR session rather than the current "bursty" approach to requesting large chunks in one hit and then going quiet until the next cache update or map relocation. Expect this to happen soon. Waze soon, that is... i.e. it's a fairly big job with plenty of things to get horribly wrong and totally screw up the script, so probably not something I'm going to be able to fix during my usual lunchtime coding sessions.
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.14 (20141029)

Postby Twister-UK » Thu Oct 30, 2014 12:07 am

2.14 now provides visualisation and filtering for Place Update Requests (aka PURs) - these are shown on the map as yellow pentagons. Thanks to ragacs for providing the initial code update for this.

As the addition of the PUR filter options has now caused the LMUR UI to grow even taller, 2.14 now also allows the three main UI sections (UR filters, MP filters and PUR filters) to be collapsed/expanded.


Firefox+Greasemonkey version: https://greasyfork.org/scripts/1948-livemap-ur-overlay
Chrome Web Store version: https://chrome.google.com/webstore/deta ... niefljookp
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.12 (20141012)

Postby Twister-UK » Fri Oct 24, 2014 5:34 pm

Szata76 wrote:Could You fix it and when? Soon? :D


Hmm, it's a tricky one, might take a while...







...OK, it's done ;)
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.13 (20141024)

Postby Twister-UK » Fri Oct 24, 2014 5:30 pm

2.13 fixes the marker popup issue which seems to have been caused by a sneaky update to the LiveMap site.

In other news...

  • The master enable checkbox state is now remembered during UI minimise/maximise operations
  • The download link within the UI finally points to the correct place - how I failed to spot this one was still pointing to userscripts after all this time is a mystery :shock:

Firefox+Greasemonkey version: https://greasyfork.org/scripts/1948-livemap-ur-overlay
Chrome Web Store version: https://chrome.google.com/webstore/deta ... niefljookp
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

Re: [Script] Live Map UR Layer v2.12 (20141012)

Postby Twister-UK » Fri Oct 24, 2014 1:44 pm

I've just tried 2.11 and that's failing as well, so I'm going to assume Waze have done a sneaky update of the Livemap site and broken LMUR in the process...
Chris (not to be confused with Chris or Chris...)
L4 AM SE England & Shetland Islands / WME Beta Tester / Script Writer
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Twister-UK
Beta tester
Beta tester
 
Posts: 5807
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 439 times
Been thanked: 2593 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: JustinS83, MapOMatic