[Script] WME LiveMap Alerts Overlay

LiveMap Alerts Overlay provides the alerts from LiveMap in WME. As you hover over a closure or other alert, a popup will appear in the upper left corner of the map with the raw details from LiveMap as well as the calculated “age” of the report. The report age is particularly helpful to see as what might initially appear as heavy traffic along a route may actually be old. This is something that is available with the LiveMap data, but which is not displayed on the LiveMap.

Many thanks to Timbones and Twister-UK for scripts like WMECH and URO+, which provided an initial foundation for LiveMap Alerts Overlay. If the popup looks familiar, it’s because the styling was meant to maintain continuity with URO+.

MOD EDIT. WORKING VERSION LINK by Majkii T:

NON WORKING LINK
Version 0.5.2 is currently available for Tampermonkey and Greasemonkey here:


Yes. I’ll plan on adjusting this in a future version. When I first starting working on this, I discovered that the necessary offset actually differs depending on the zoom level. Otherwise, it would already be shifted up a few pixels.

Version 0.2 has been released incorporating the layer changes and offset. Thanks!

Version 0.3.1 of LiveMap Alerts Overlay has been released, which adds friendlier Type and Subtype text (i.e. “Road Closed” instead of “ROAD_CLOSED”). It also fixes a bug where the popup would not display after the user saves.

It’s not the link to ‘WME LiveMap Alerts Overlay’ but to ‘WME Road Closures’…

Thanks. :oops:
I edited it correctly in the original post, but I didn’t check the link in the latter post. As you probably know, we’ve been working to get these two scripts to work better together over the past few days. Cross marketing…

:smiley:

Version 0.4.1 adds support for shifting the Alert Detail popup when either the UR or MP panel is visible. Images have also been encoded and saved with the script in case Waze changes their name or location in the future.

https://greasyfork.org/scripts/5138-wme-livemap-alerts-overlay

I thought that I had accounted for that at some point, but looking back through the history, I guess not. In any case, version 0.4.2 is now available that will hide the popup detail if the “LiveMap Alerts” layer is disabled.

https://greasyfork.org/scripts/5138-wme-livemap-alerts-overlay

Version 0.5.1 is available on GreasyFork, which gradually increases an alert’s transparency as it ages. It works in increments of 15 minutes, where an alert will be fully opaque initially, but as it gets older, it gradually fades.

This screenshot illustrates the difference between an alert that is less than fifteen minutes old and one that is just over 30 minutes old:

https://greasyfork.org/scripts/5138-wme-livemap-alerts-overlay

NOTE: Since road closures published by Waze are refreshed continually, they never age like standard alerts do. As a result, transparency is not affected for these closures.

Version 0.5.2 has been released to GreasyFork:
https://greasyfork.org/en/scripts/5138-wme-livemap-alerts-overlay

This version includes a small tweak to account for changes in road closures. Closures that have been added via a method that differs from the previous way that Waze handled closures provide the actual start time of the closure instead of refreshing every few minutes. Exciting, no?

As a result, the new version of LMAO removes the gradual, fading transparency for closures as they age (but still maintains it for other report types). It also now displays the duration in minutes, hours, or days as appropriate.

Hey, I just wanted to mention that this script no longer works on the current version of Firefox. The reason for this is the code in the bootstrap function. None of that code still does something nowadays and since the latest release of Firefox the Components object is no longer available. Simply removing the bootstrap function and setting the time-out to the initializeLiveMapAlerts function makes the script work fine again.

I’m kind of surprised to see that this script still works so well after a year and a half of no updates :slight_smile:

Not real familiar with editing scripts. I can edit (blindly), text, etc. But have little background on what I’m doing, LOL.

I have the script on Chrome and its works fine. But I use FF primarily … loaded up with the better scripts, as my main editing browser. So I’d like to get this working with FF:

  • I left the the bootstrap heading, but removed all the code from the bootstrap function. Except the
    initializeLiveMapAlerts function within that block area. It has a setting of “999” for the time.

Could you “detail” the changes needed, just a little more … .dumbing it down to my level, LOL! :smiley:

Steve

Haha, no problem :slight_smile:

The only changes I’ve made to make it work again is change the bootstrapLiveMapAlerts() function to:

function bootstrapLiveMapAlerts() { setTimeout(initializeLiveMapAlerts, 999); }

That is the only thing I needed to do to make the script work on Firefox.
I also added something myself to prevent the script from constantly retrieving the livemap information even if the map layer with that information is hidden. I added this bit of code after the line that says “function getLiveMapAlerts(){”:

if (!LiveMapAlerts_Layer.getVisibility()) { return; }

Thanks. That got it working. Picture worth a thousand words, LOL!

Steve

Could this script maybe also show comments and thumbs up from users?

I’ll reply because I don’t think the script author is still active on the forums: it could, but I fear that the pop-up window will become too small rather quickly. The information retrieved from the server contains that data already, but just isn’t displayed.

Well sadly I think that it has died for me on Chrome which honestly frustrates me. I really enjoyed having this as it prevented me having to load additional windows when narrowing down closures especially while at work.

Can you maybe check out what changed Glodenox?

:confused: Sigh.

Hey there, I was off to Berlin for a holiday and therefore didn’t find any time to look into this any sooner. The issue is that the location of the map problem information has changed. The following changes should fix this:

Around line 50:

switch(server){ case 'usa': var routingURL = '//www.waze.com/rtserver/web/TGeoRSS'; break; case 'row': var routingURL = '//www.waze.com/row-rtserver/web/TGeoRSS'; break; case 'il': var routingURL = '//www.waze.com/il-rtserver/web/TGeoRSS'; break; default: var routingURL = '//www.waze.com/rtserver/web/TGeoRSS'; };
4 times GeoRSS -> TGeoRSS

Around line 82:

var data = { left: alertBounds.left, right: alertBounds.right, bottom: alertBounds.top, top: alertBounds.bottom };
We don’t need the format or data types any more now, apparently.

I’ve made some other changes myself, but those shouldn’t have an impact here.

Your opinion might, perhaps, be better expressed by simply not installing this script. Plainly others do not feel the same, since over 600 people have installed this script.

If you have some constructive ideas as to how the script might be improved, I’m sure that would be welcome. Otherwise, comments like yours are not very nice for a script author to read when they have donated their time and effort to produce something to help other editors. Please be nice to the script authors.