[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.5 (20140102)

Postby Twister-UK » Wed Feb 12, 2014 7:11 am

It should work the same way as the comment filters in URO+
L4 AM for London/Thames Valley and Shetland Islands
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Image
Twister-UK
Area Manager
Area Manager
 
Posts: 2339
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 331 times
Been thanked: 1985 times

Re: [Script] Live Map UR Layer v2.5 (20140102)

Postby Szata76 » Wed Feb 12, 2014 12:07 pm

Twister-UK wrote:It should work the same way as the comment filters in URO+

I think it's not adequate. I can't enter a word what is common in every comment so the filtering isn't successful.

Tapatalked by SGS2
Hardware: LG G4 (H815) / OS: 6.0
Editor level: 5; Area: Magyarország / Hungary ● Corfu (GR)
feedthe.waze.hu: Country Feed Manager (Roadworks reporting)
facebook.com/waze.hu ● google.com/+WazeHUN ● wiki.waze.hu
Szata76
Waze Global Champs
Waze Global Champs
 
Posts: 1645
Joined: Fri Jun 10, 2011 5:07 pm
Location: EU, Hungary, Budapest
Has thanked: 291 times
Been thanked: 479 times

Re: [Script] Live Map UR Layer v2.5 (20140102)

Postby Twister-UK » Wed Feb 12, 2014 3:27 pm

I'd prefer not to include filtering based on the comments text itself, as this would significantly increase the amount of data that LMUR needs to store, and it's already storing more than I'd like...
L4 AM for London/Thames Valley and Shetland Islands
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Image
Twister-UK
Area Manager
Area Manager
 
Posts: 2339
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 331 times
Been thanked: 1985 times

Re: [Script] Live Map UR Layer v2.5 (20140102)

Postby iainhouse » Sun Feb 16, 2014 1:32 am

[EDIT] This entire post can be ignored because the author has now provided this functionality and - of course - much better than me. :D

I have a couple of hacks for the LMUR script: a simple one that will hide closed URs on the Livemap and a more complex one that will change them to orange instead.

Please note: these are only for somebody who is confident altering an installed script - I'm not going to provide instructions (which I could only do for Chrome on Windows anyway). Also, I am not a genius like wot the bloke who wrote this script is. :lol: The second hack is inelegant because I couldn't work out how to use a variable or conditional for the colour. :oops:

Hide Solved URs

At line 294 of my script I have this line:
Code: Select all
if(ureq.markerObj.description != null) desc = ureq.markerObj.description;

Immediately after that line, add this line:
Code: Select all
if(ureq.markerObj.open == false) return true;


Turn Solved URs Orange

Bearing in mind I've hacked my version a bit already, somewhere close to line 600 you will find this code:
Code: Select all
         if(ureq.markerType == 1)
         {
            svgSrc += '<rect x="'+ureq.px+'" y="'+ureq.py+'" transform="rotate(45,'+ureq.px+','+ureq.py+')" width="10" height="10" style="fill:orange;stroke:blue;fill-opacity:'+fillOpacity+';stroke-opacity:1"/>';
         }

Change it to
Code: Select all
         if(ureq.markerType == 1)
         {
            if(ureq.markerObj.open == false)
            {
               svgSrc += '<rect x="'+ureq.px+'" y="'+ureq.py+'" transform="rotate(45,'+ureq.px+','+ureq.py+')" width="10" height="10" style="fill:orange;stroke:blue;fill-opacity:'+fillOpacity+';stroke-opacity:1"/>';
            }
            else
            {
               svgSrc += '<rect x="'+ureq.px+'" y="'+ureq.py+'" transform="rotate(45,'+ureq.px+','+ureq.py+')" width="10" height="10" style="fill:red;stroke:blue;fill-opacity:'+fillOpacity+';stroke-opacity:1"/>';
            }
         }


These are only temporary fixes. I have no doubt that soon (and not a Waze "soon"), these will be optional selections in the script with proper checkboxes in the interface.

[EDIT] This entire post can be ignored because the author has now provided this functionality and - of course - much better than me. :D
Last edited by iainhouse on Sun Feb 16, 2014 1:33 pm, edited 1 time in total.
Reason: superseded by script update
Image
AM: London (DELETED)
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 7034
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity
Has thanked: 1224 times
Been thanked: 4320 times

Re: closed URs

Postby dbraughlr » Sun Feb 16, 2014 2:32 am

[obsolete]
Last edited by dbraughlr on Sun Feb 16, 2014 7:33 pm, edited 1 time in total.
dbraughlr
 
Posts: 569
Joined: Tue Aug 13, 2013 2:24 am
Has thanked: 164 times
Been thanked: 98 times

Re: [Script] Live Map UR Layer v2.6 (20140216)

Postby Twister-UK » Sun Feb 16, 2014 11:41 am

Taking longer than I'd like to add in support for UR comments, so 2.6 is an interim release which includes support for filtering solved URs and problems. When the solved filters aren't enabled, the markers for solved URs and problems are shown with a white circle background to differentiate them from the unsolved markers. The popup shown when you hover the mouse over the marker also now shows how long ago the UR/problem was resolved.


Firefox+Greasemonkey version: http://userscripts.org/scripts/show/150276
Chrome Web Store version: https://chrome.google.com/webstore/deta ... niefljookp
L4 AM for London/Thames Valley and Shetland Islands
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Image
Twister-UK
Area Manager
Area Manager
 
Posts: 2339
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 331 times
Been thanked: 1985 times

Re: closed URs

Postby iainhouse » Sun Feb 16, 2014 1:42 pm

dbraughlr wrote:If it works for you, you may edit your preceding post with the shorter code and I'll delete mine. If it doesn't work, I'll still delete mine.


Thanks for that. I realise why nothing I tried worked - I hadn't noticed I was editing a string quoted inside another string. I was using the wrong quotes to insert my variable in the middle. :oops:

I probably wouldn't have bothered altering my original hack. Inelegant as it was it was only a quick hack which has (unsurprisingly) been promptly superseded by a properly coded & better solution in the latest update from Twister-UK.

I'll remember your teachings, Master Yoda, next time I try to hack a script. :lol:
Image
AM: London (DELETED)
ImageImageImage
UK AdminsUK WikiWaze FAQWMEFU Script :ugeek:
I want to go to a commune in Vermont and deal with no unit of time shorter than a season
iainhouse
Country Manager
Country Manager
 
Posts: 7034
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity
Has thanked: 1224 times
Been thanked: 4320 times

Re: [Script] Live Map UR Layer v2.7 (20140223)

Postby Twister-UK » Sun Feb 23, 2014 12:10 pm

2.7 finally includes support for UR comments... With one exception, all of the comment-based filtering options present in URO+ are now also present in LMUR. I haven't included support for the "show/hide URs I'm following" filter, due to the amount of extra data I'd need to pull across from the WME server just to get the data required for that filter.

Comment filtering is only possible when the user is logged-in to the Livemap server, and so I've taken the decision to require the user to be logged-in in order to enable LMUR at all, as this makes the behind the scenes operations a lot cleaner. As with the requirement to be on the secure Livemap server, if you're not logged-in then it'll be pretty obvious...

I've also tweaked the way the script handles its local data cache, to reduce the number of times it reloads data from the WME server - this not only makes life easier for the server (especially now with the extra access calls required to get the comments data), but it also improves Livemap responsiveness when panning/zooming within the already cached area. One side-effect of this change is that LMUR will now only auto-refresh the central 1x1 degree region every 60s, whereas previously it would auto-refresh the central 3x3 degree region.


Firefox+Greasemonkey version: http://userscripts.org/scripts/show/150276
Chrome Web Store version: https://chrome.google.com/webstore/deta ... niefljookp
L4 AM for London/Thames Valley and Shetland Islands
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Image
Twister-UK
Area Manager
Area Manager
 
Posts: 2339
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 331 times
Been thanked: 1985 times

Re: [Script] Live Map UR Layer v2.7 (20140223)

Postby ditchi56 » Tue Feb 25, 2014 11:02 am

Twister-UK wrote:2.7 finally includes support for UR comments

Many thanks. Just one gripe / bug report:

I think "hide if last comment made less than nn days ago" should only hide UR's which do actually have a comment. At present it's hiding UR's with no comment too (presumably only if they're less than nn days old, although I haven't checked this).
ditchi56
Country Manager
Country Manager
 
Posts: 4443
Joined: Tue May 29, 2012 12:35 pm
Has thanked: 908 times
Been thanked: 1803 times

Re: [Script] Live Map UR Layer v2.7 (20140223)

Postby Twister-UK » Tue Feb 25, 2014 1:59 pm

ditchi56 wrote:
Twister-UK wrote:2.7 finally includes support for UR comments

Many thanks. Just one gripe / bug report:

I think "hide if last comment made less than nn days ago" should only hide UR's which do actually have a comment. At present it's hiding UR's with no comment too (presumably only if they're less than nn days old, although I haven't checked this).


Oops... This is due to the way the marker objects get initialised - the comments data is loaded seperately to the main marker data, so I have to initialise the comment parameters with safe defaults first, and then fill in the correct values once the comment data is available. However, for markers that don't have comments, the safe default values are then left untouched. And it just so happens that the safe default value for the "last comment age" parameter is such that, if I then forget to disable the comment filters for URs that don't actually have any comments (and yes, that's exactly what I've done), the "hide less than n days" filter triggers regardless of how many days are set as the threshold and, as if by magic, the UR disappears...

I'll roll out a fix for this soon.
L4 AM for London/Thames Valley and Shetland Islands
WME/Livemap enhancement scripts @ GreasyFork and Chrome Web Store
Image
Twister-UK
Area Manager
Area Manager
 
Posts: 2339
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 331 times
Been thanked: 1985 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: carloslaso