Skip to content

AntonShevchuk/wme-e95

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

118 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

WME πŸ‡ΊπŸ‡¦ E95

User script for Waze Map Editor. Create an additional panel with buttons for set up a set of road properties in one click.

Options for a Segment

Ukrainian manual: https://wazeopedia.waze.com/wiki/Ukraine/Scripts/WME_E95

Development

Install & Build

npm install
npm run build       # one-off build β†’ dist/WME-E95.user.js
npm run watch       # rebuild on changes

Project Structure

Source 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

Adding a New Country

  1. Find the country's numeric ID in the Waze Map Editor (visible in the WME SDK or URL when editing in that country).

  2. 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
  1. Import and register it in src/buttons/index.ts:
import example from './countries/example'

const countries: CountryConfig[] = [
  albania, greece, honduras, hungary, portugal, ukraine, example,
]
  1. Build and verify: npm run build

Button Config Reference

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.

Default settings

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

Country Configurations

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.

Albania πŸ‡¦πŸ‡±

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

Greece πŸ‡¬πŸ‡·

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)

Honduras πŸ‡­πŸ‡³

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

Hungary πŸ‡­πŸ‡Ί

Minimal overrides β€” only adjusts speed limits on buttons A, B, G:

A B G
Button PR20 PR30 PLR
Speed 20 30 20

Portugal πŸ‡΅πŸ‡Ή

Minimal overrides β€” adjusts speed limits on buttons G, H:

G H
Button PLR OR
Speed 30 30

Ukraine πŸ‡ΊπŸ‡¦

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 β€” β€” β€” β€”

Links

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

About

User script for Waze Map Editor

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors