ΠΠ°Π½Π½ΡΠΉ ΡΠΊΡΠΈΠΏΡ ΠΏΠΎΠ·Π²ΠΎΠ»ΡΠ΅Ρ ΠΈΠ·ΠΌΠ΅Π½ΡΡΡ ΠΏΠ»ΠΎΡΠ°Π΄Ρ POI, Π²ΡΡΠ°Π²Π½ΠΈΠ²Π°ΡΡ ΠΈ ΠΊΠΎΠΏΠΈΡΠΎΠ²Π°ΡΡ Π³Π΅ΠΎΠΌΠ΅ΡΡΠΈΡ
User script for Waze Map Editor. Create additional panel with buttons for change Place geometry in one click.




npm install
npm run build # one-off build β dist/WME-E40.user.js
npm run watch # rebuild on changes
Source is written in TypeScript under src/, built with Rollup into a single IIFE at dist/WME-E40.user.js.
src/
βββ meta.ts # userscript header (comment block)
βββ style.css # plain CSS
βββ globals.d.ts # WME runtime globals
βββ translations.ts # i18n (en, uk, ru)
βββ types.ts # road type constants
βββ settings.ts # default settings
βββ layers.ts # navigation vector layer config
βββ buttons.ts # button definitions (place, point, tab)
βββ geo-utils.ts # GeoUtils β spherical geometry math
βββ geometry.ts # polygon creation and manipulation
βββ e40.ts # E40 class (main logic)
βββ helpers.ts # standalone wrapper functions
βββ index.ts # bootstrap entry point
| Module | Responsibility |
|---|---|
translations.ts |
NAME, REQUIRED_LEVEL, TRANSLATION (3 languages) |
types.ts |
Road type numeric constants (TYPES.street, TYPES.freeway, etc.) |
settings.ts |
Default options (navigation point visibility) |
layers.ts |
Layer style rules for navigation vector visualization |
buttons.ts |
Three button sets: getPlaceButtons() (polygon tools), getPointButtons() (point-to-shape), getTabButtons() (batch operations for rank 3+) |
geo-utils.ts |
GeoUtils class β bearing, angle, distance, intersection calculations on the sphere |
geometry.ts |
createCirclePolygon, createSquarePolygon, simplifyPolygon, normalizeRightAngles
|
e40.ts |
E40 class β UI panels, keyboard shortcuts, layer management, all geometry operations |
helpers.ts |
Thin wrappers that delegate to the E40 instance (used by button callbacks) |
index.ts |
Bootstrap β registers translations/CSS, creates E40 instance on bootstrap.wme
|
| Shortcut | Description |
|---|---|
Shift+1
|
Smooth selected POI(s) |
Shift+2
|
Orthogonalize selected POI(s) |
None |
Simplify selected POI(s) (tolerance = 0.00001) |
None |
Simplify selected POI(s) (tolerance = 0.00003) |
None |
Simplify selected POI(s) (tolerance = 0.00005) |
None |
Copy and paste selected POI(s) |
Shift+3
|
Enable Rotation for selected Place |
Shift+4
|
Enable Scale for selected Place |
Shift+5
|
Scale selected POI(s) to 500mΒ² |
Shift+6
|
Scale selected POI(s) to 650mΒ² |
Shift+7
|
Scale selected POI(s) to 650mΒ² if the square lower than 650mΒ² |
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-e40/
GreasyFork: https://greatest.deepsurf.us/uk/scripts/388271-wme-e40-geometry