Skip to content

Commit

Permalink
Restore triangle RPP style
Browse files Browse the repository at this point in the history
  • Loading branch information
mapomatic committed Oct 27, 2024
1 parent f40a0a8 commit 9a77b33
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions WME-Place-Harmonizer.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name WME Place Harmonizer Beta
// @namespace WazeUSA
// @version 2024.10.11.000
// @version 2024.10.27.000
// @description Harmonizes, formats, and locks a selected place
// @author WMEPH Development Group
// @include /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/
Expand Down Expand Up @@ -2514,6 +2514,8 @@
}

function initializeHighlights() {
OpenLayers.Renderer.symbol.triangle = [0, -10, 10, 10, -10, 10, 0, -10]; // [0, 10, 10, -10, -10, -10, 0, 10];

const ruleGenerator = (value, symbolizer) => new W.Rule({
filter: new OpenLayers.Filter.Comparison({
type: '==',
Expand All @@ -2527,6 +2529,21 @@
wmephStyle: 'default'
});

const rppRule = new W.Rule({
filter: new OpenLayers.Filter.Comparison({
type: '==',
value: true,
evaluate(feature) {
return feature.attributes.wazeFeature?._wmeObject.isResidential();
}
}),
symbolizer: {
graphicName: 'triangle',
pointRadius: 7
},
wmephStyle: 'default'
});

const severity0 = ruleGenerator(0, {
pointRadius: 5,
externalGraphic: '',
Expand Down Expand Up @@ -2666,7 +2683,7 @@
});

_layer.styleMap.styles.default.rules.push(...[severity0, severityLock, severity1, severityLock1, severity2,
severity3, severity4, severity6, severityHigh, severityAdLock, publicPLA, restrictedPLA, privatePLA]);
severity3, severity4, severity6, severityHigh, severityAdLock, rppRule, publicPLA, restrictedPLA, privatePLA]);
}

/**
Expand Down

0 comments on commit 9a77b33

Please sign in to comment.