User script for Waze Map Editor. Create an additional panel with buttons for set up a set of road properties in one click.
Ukrainian manual: https://wazeopedia.waze.com/wiki/Ukraine/Scripts/WME_E95
npm install
npm run build # one-off build β dist/WME-E95.user.js
npm run watch # rebuild on changesSource is written in TypeScript under src/, built with Rollup into a single IIFE at dist/WME-E95.user.js.
src/
βββ meta.ts # userscript header (comment block)
βββ style.css # plain CSS
βββ globals.d.ts # WME runtime globals
βββ types.ts # road types, colors, TS interfaces
βββ translations.ts # i18n (en, uk, ru)
βββ layers.ts # speed limit / headlights layers
βββ buttons/
β βββ index.ts # default buttons (A-L), country registry
β βββ countries/ # per-country overrides
βββ e95.ts # E95 class
βββ index.ts # bootstrap entry point
-
Find the country's numeric ID in the Waze Map Editor (visible in the WME SDK or URL when editing in that country).
-
Create a new file
src/buttons/countries/<country>.ts:
import { CountryConfig, TYPES } from '../../types'
const example: CountryConfig = {
id: 123, // Waze country ID
name: 'example', // lowercase, used as key
buttons: {
// Override existing buttons (A-L) β partial overrides are OK,
// missing fields are inherited from defaults via deep merge
D: {
title: 'St60',
attributes: {
fwdSpeedLimit: 60,
revSpeedLimit: 60,
roadType: TYPES.street,
lockRank: 1,
},
},
// Set a button to false to disable it
G: false,
// Add extra buttons beyond A-L
M: {
title: 'FW120',
attributes: {
fwdSpeedLimit: 120,
revSpeedLimit: 120,
roadType: TYPES.freeway,
lockRank: 4,
},
},
},
}
export default example- Import and register it in
src/buttons/index.ts:
import example from './countries/example'
const countries: CountryConfig[] = [
albania, greece, honduras, hungary, portugal, ukraine, example,
]- Build and verify:
npm run build
| Field | Type | Description |
|---|---|---|
title |
string |
Button label (e.g., 'St50') |
shortcut |
string | null |
Keyboard shortcut (e.g., 'A+1' for Alt+1) |
options.detectCity |
boolean |
Auto-detect city from neighboring segments |
options.clearCity |
boolean |
Clear city and street |
attributes.fwdSpeedLimit |
number |
Forward speed limit (km/h) |
attributes.revSpeedLimit |
number |
Reverse speed limit (km/h) |
attributes.roadType |
number |
Use TYPES.* constants (e.g., TYPES.street) |
attributes.lockRank |
number |
Lock level 0-4 (capped to user's rank at runtime) |
attributes.flagAttributes |
object |
Flags like { headlights: true, unpaved: true } |
Available road types: street, primary, freeway, ramp, trail, major, minor, offroad, walkway, boardwalk, ferry, stairway, private, railroad, runway, parking, narrow.
| Button | Shortcut | Type | Speed | City | Lock |
|---|---|---|---|---|---|
| PR 5 | Alt+1 |
private | 5 km/h | auto | 1 |
| PR20 | Alt+2 |
private | 20 km/h | auto | 1 |
| PR50 | Alt+3 |
private | 50 km/h | auto | 1 |
| St50 | Alt+4 |
street | 50 km/h | auto | 1 |
| PS50 | Alt+5 |
primary | 50 km/h | auto | 2 |
| mH50 | None |
minor highway | 50 km/h | auto | 3 |
| PLR | Alt+6 |
parking | 5 km/h | auto | 1 |
| OR | Alt+7 |
off-road | 90 km/h | none | 1 |
| PR90 | Alt+8 |
private | 90 km/h | none | 1 |
| St90 | Alt+9 |
street | 90 km/h | none | 1 |
| PS90 | Alt+0 |
primary | 90 km/h | clear | 2 |
| mH90 | None |
minor highway | 90 km/h | clear | 3 |
The script automatically detects the country from the map and applies country-specific button overrides. Countries override the default button layout β unspecified buttons inherit default settings via deep merge.
Full button layout replacement with local speed limits:
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| Button | PLR | Pr40 | St40 | PS40 | mH40 | MH40 |
| Type | parking | private | street | primary | minor | major |
| Speed | 5 | 40 | 40 | 40 | 40 | 40 |
| G | H | I | J | K | L | |
|---|---|---|---|---|---|---|
| Button | FW90 | Pr80 | St80 | PS80 | mH80 | MH80 |
| Type | freeway | private | street | primary | minor | major |
| Speed | 90 | 80 | 80 | 80 | 80 | 80 |
Overrides D-F and J-L, adds extra buttons M-P:
| D | E | F | J | K | L | |
|---|---|---|---|---|---|---|
| Button | ST30 | ST50 | ST90 | PR30 | PR50 | PR90 |
| Type | street | street | street | primary | primary | primary |
| Speed | 30 | 50 | 90 | 30 | 50 | 90 |
Extra buttons: M (private), N (unpaved street), O (unpaved street 40), P (street)
Uses only 6 buttons (G-L disabled), all with auto city detection:
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| Button | PR | PLR | StU | StP | PSU | PSP |
| Type | private | parking | street | street | primary | primary |
| Speed | 20 | 20 | 40 | 40 | 40 | 40 |
| Flags | unpaved | unpaved |
Minimal overrides β only adjusts speed limits on buttons A, B, G:
| A | B | G | |
|---|---|---|---|
| Button | PR20 | PR30 | PLR |
| Speed | 20 | 30 | 20 |
Minimal overrides β adjusts speed limits on buttons G, H:
| G | H | |
|---|---|---|
| Button | PLR | OR |
| Speed | 30 | 30 |
Overrides buttons H-L to add the headlights flag for roads outside cities:
| H | I | J | K | L | |
|---|---|---|---|---|---|
| Button | OR | PR90 | St90 | PS90 | mH90 |
| Headlights | yes | yes | yes | yes | yes |
| Clear city | yes | β | β | β | β |
Author homepage: https://anton.shevchuk.name/
Author pet projects: https://hohli.com/
Support author: https://donate.hohli.com/
Script homepage: https://github.com/AntonShevchuk/wme-e95/
GreasyFork: https://greasyfork.org/uk/scripts/382614-wme-e95
