Get a sneak peek at whats next for Permanent Hazards on our April 7th Office Hours!
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.
Post by lg1992
phuz wrote:I have the script failing to highlight any PLRs.
I suspect the script doesn't highlight segments below primary streets if the zoom in the URL is 0-4 (it doesn't matter what is the real current zoom level). To override this bug you can click the chain icon in the bottom bar to match zoom in the URL to the current zoom level.
lg1992
Country Manager
Country Manager
Posts: 6853
Has thanked: 261 times
Been thanked: 1176 times
Send a message
Leonid, Country Manager, Israel

Post by lg1992
The script doesn't check for the current zoom level, but for the original one defined in the URL. As a result, if I open the editor with zoom level 2 or 3 and then zoom in, the script only marks primary streets ad higher types as locked.

To fix the problem it's enough to replace in 2 places W.map.zoom with W.map.getZoom()
lg1992
Country Manager
Country Manager
Posts: 6853
Has thanked: 261 times
Been thanked: 1176 times
Send a message
Leonid, Country Manager, Israel

Post by lg1992
It's confusing that colors by a selected city differ for roads and places. I would prefer to see places pink too.
lg1992
Country Manager
Country Manager
Posts: 6853
Has thanked: 261 times
Been thanked: 1176 times
Send a message
Leonid, Country Manager, Israel

Post by lg1992
Please add one more option to "Filter by City" - to mark segments and places with undefined city name if they are present on the map.
lg1992
Country Manager
Country Manager
Posts: 6853
Has thanked: 261 times
Been thanked: 1176 times
Send a message
Leonid, Country Manager, Israel

Post by LihtsaltMats
Looks like version 2.180 has wrecked the script. Is it still actively supported?
LihtsaltMats
Posts: 50
Has thanked: 45 times
Been thanked: 24 times
Send a message

Post by LihtsaltMats
Timbones wrote: Tue Aug 22, 2023 1:54 pm What problem are you seeing with this script? Do you still see the problem when all other scripts are disabled?





 
With only this script enabled the filter by city isn't working. It happens when I try to open the selectbox for the cities. 

Code: Select all

Uncaught TypeError: Cannot read properties of null (reading 'attributes')
at HTMLSelectElement.updateCityList (userscript.html?name=WME-Color-Highlights.user.js&id=e80113cf-653e-46bf-94f9-6b4d359102ea:998:49)
 
cities.png
(11.22 KiB) Downloaded 93 times
In addition to the previously mentioned username changes. Maybe this will give you a little headstart:

Line 152:

Code: Select all

 var cityID = street?.attributes.cityID;
Line 663: 

Code: Select all

 var selectedCityMatch = (specificCity && venueStreet.attributes.cityID == selectedCityId);
 
(around line 990): 

Code: Select all

 for (var [cityId, city] of Object.entries(W.model.cities.objects)) {
  cityIds.push(cityId);
  cityObjs.push({
    id: city.attributes.id,
    name: city.attributes.name,
    state: city.attributes.stateID,
    country: city.attributes.countryID
  });
}
 
 
LihtsaltMats
Posts: 50
Has thanked: 45 times
Been thanked: 24 times
Send a message
Last edited by LihtsaltMats on Wed Aug 23, 2023 12:36 pm, edited 1 time in total.

Post by LihtsaltMats
VILLAformer wrote: Wed Aug 23, 2023 10:33 am Since yesterday, the "No Name (Orange)" option does not work for me. I have tried to reinstall the script and leave him alone active but nothing.

 
While the script is being updated you can temporarily fix it by changing line 155:

Code: Select all

var noName      = street?.attributes.isEmpty;
LihtsaltMats
Posts: 50
Has thanked: 45 times
Been thanked: 24 times
Send a message

Post by LihtsaltMats
LihtsaltMats wrote: Tue Aug 22, 2023 3:10 pm In addition to the previously mentioned username changes. Maybe this will give you a little headstart:

Line 152:

Code: Select all

 var cityID = street?.attributes.cityID;
Line 663: 

Code: Select all

 var selectedCityMatch = (specificCity && venueStreet.attributes.cityID == selectedCityId);
 
(around line 990): 

Code: Select all

 for (var [cityId, city] of Object.entries(W.model.cities.objects)) {
  cityIds.push(cityId);
  cityObjs.push({
    id: city.attributes.id,
    name: city.attributes.name,
    state: city.attributes.stateID,
    country: city.attributes.countryID
  });
}
 
 
R66DE wrote: Thu Aug 24, 2023 5:21 am Thanks for the fix, but the option for "No City" doesn't work, too.
 
 These should fix that.
I hope the creator doesn't mind me sharing. It's just a very useful script.
LihtsaltMats
Posts: 50
Has thanked: 45 times
Been thanked: 24 times
Send a message


Post by littlestlou
Thank goodness I am not the only one. I didn't realize Chrome updated but in the last 48-72 hours, the Highlights stopped working on my machine too. Found the 1.6.4 link and am back in business. Thanks again!
littlestlou
Posts: 237
Has thanked: 5 times
Send a message
[img]https:///WS6zp[/img][img]https:///0NAfp[/img]