Skip to content

Commit

Permalink
Merge branch 'Beta'
Browse files Browse the repository at this point in the history
  • Loading branch information
mapomatic committed Mar 19, 2020
2 parents 79471cd + 9145fe7 commit 8a1e721
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions WME-Place-Harmonizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// ==UserScript==
// @name WME Place Harmonizer
// @namespace WazeUSA
// @version 2020.03.15.001
// @version 2020.03.18.001
// @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 @@ -33,6 +33,9 @@

// Script update info
const _WHATS_NEW_LIST = { // New in this version
'2020.03.18.001': [
'Bug fix for X-Ray Mode, caused by WME changes.'
],
'2020.03.15.001': [
'FIXED: When clicking the "Use PNH URL" button, a window would open to report an error.'
],
Expand Down Expand Up @@ -1154,27 +1157,29 @@ function toggleXrayMode(enable) {

const commentsLayer = W.map.getLayerByUniqueName('mapComments');
const gisLayer = W.map.getLayerByUniqueName('__wmeGISLayers');
const satLayer = W.map.getLayerByUniqueName('satellite_imagery');
const roadLayer = W.map.roadLayers[0];
const commentRuleSymb = commentsLayer.styleMap.styles.default.rules[0].symbolizer;
if (enable) {
_layer.styleMap.styles.default.rules = _layer.styleMap.styles.default.rules.filter(rule => rule.wmephDefault !== 'default');
W.map.roadLayers[0].opacity = 0.25;
W.map.baseLayer.opacity = 0.25;
roadLayer.opacity = 0.25;
satLayer.opacity = 0.25;
commentRuleSymb.Polygon.strokeColor = '#888';
commentRuleSymb.Polygon.fillOpacity = 0.2;
if (gisLayer) gisLayer.setOpacity(0.4);
} else {
_layer.styleMap.styles.default.rules = _layer.styleMap.styles.default.rules.filter(rule => rule.wmephStyle !== 'xray');
W.map.roadLayers[0].opacity = 1;
W.map.baseLayer.opacity = 1;
roadLayer.opacity = 1;
satLayer.opacity = 1;
commentRuleSymb.Polygon.strokeColor = '#fff';
commentRuleSymb.Polygon.fillOpacity = 0.4;
if (gisLayer) gisLayer.setOpacity(1);
initializeHighlights();
_layer.redraw();
}
commentsLayer.redraw();
W.map.roadLayers[0].redraw();
W.map.baseLayer.redraw();
roadLayer.redraw();
satLayer.redraw();
if (!enable) return;

const defaultPointRadius = 6;
Expand Down

0 comments on commit 8a1e721

Please sign in to comment.