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

Postby foxitrot » Mon Mar 10, 2014 3:31 pm

That's the way URs can be teasing you ;-)

Sent from a touch display, which took care of perfectly scrambling my thoughts.
foxitrot
Waze Global Champs
Waze Global Champs
 
Posts: 7070
Joined: Thu Jul 14, 2011 10:22 pm
Location: Slovakia
Has thanked: 2367 times
Been thanked: 1077 times

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

Postby Twister-UK » Mon Mar 10, 2014 1:33 pm

Problem solved... There are two URs with almost identical co-ords here, one of which has comments and one of which doesn't, and it's simply a case that WME and LMUR are rendering the markers in opposite orders. Use of the appropriate filtering options in either LMUR or URO allows the other UR marker to become visible/selectable.
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 times

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

Postby Twister-UK » Sun Mar 09, 2014 7:54 pm

Odd, LMUR is definitely getting the correct data back from the server for this UR, and I can't see anything different about the data format that might throw off the comment handling code. Will have to spend a bit of time digging into this one...
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 times

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

Postby ditchi56 » Sat Mar 08, 2014 5:15 am

A bug, although I shan't be surprised if it turns out to be in Waze code rather than your script...
This UR has one comment, a fact which WME recognises. However LMUR continues to show it has having no comments.
ditchi56
Country Manager
Country Manager
 
Posts: 4961
Joined: Tue May 29, 2012 12:35 pm
Has thanked: 1116 times
Been thanked: 2073 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.
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 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: 4961
Joined: Tue May 29, 2012 12:35 pm
Has thanked: 1116 times
Been thanked: 2073 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
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 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
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 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
iainhouse
Country Manager
Country Manager
 
Posts: 7500
Joined: Mon Jul 23, 2012 5:16 pm
Location: on the road from London to insanity
Has thanked: 1444 times
Been thanked: 4957 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...
Twister-UK
Area Manager
Area Manager
 
Posts: 2505
Joined: Sat Jan 07, 2012 12:00 am
Location: NW London
Has thanked: 364 times
Been thanked: 2168 times

PreviousNext

Return to Addons, Extensions, and Scripts

Who is online

Users browsing this forum: abusimbel16