WME Junction Angle Info

Show the angle between two connected (or selected) segments — experimental branch adding Junction Box and Path (far turn) support

queste sono le versioni di questo script in cui il codice è stato aggiornato Visualizza tutte le versioni.

  • v3.3.1 31/05/2026

    Small UI fix

  • v3.3.0 29/05/2026

    Implement real-time marker updates during segment dragging

    Add live marker updates as users drag segment nodes, eliminating the delay that previously showed angle changes only after mouse-up. The feature uses SVG polyline polling to extract current segment geometry and patches the segment object with live coordinates before angle calculations.

    Technical approach:

    • Poll SVG polyline every 100ms for coordinate changes during drag
    • Extract map-pixel coordinates from SVG and convert to lat/lon via SDK
    • Detect changes with 6-decimal precision to avoid floating-point noise
    • Patch selected segment geometry with live coords before ja_draw_node_markers()
    • Call testSelectedItem() directly to bypass 200ms debounce
    • Other connected segments remain from data model (stale but consistent)
    • Polling stops automatically when segment is deselected

    New infrastructure:

    • 6 core functions: getDragGeometryPoller, extractGeopointsFromSVG, pixelToLatLon, getSVGCoordsAsLatLon, haveCoordinatesChanged, pollSegmentGeometryDuringDrag
    • Patch function: patchSegmentWithLiveCoords (injects live geometry)
    • 6 state variables for polling control and coordinate tracking
    • Event handlers: wme-selection-changed (enable/disable) and wme-map-mouse-move (trigger polling)

    No impact on continuous scanning or existing angle calculation logic.

  • v3.2.2 14/04/2026

    Tame logging level

  • v3.2.1 14/04/2026

    scanning mode evaluates all pair directions, so it catches PROBLEM angles regardless of segment order in the angles array.

  • v3.2.0 14/04/2026

    Continuous scanning feature: background detection of PROBLEM angles with caching and incremental batching; restored previous routing logic (removed Ambiguous KEEP zone)

    Extended BC evaluation zone from <44° to <47° (TURN_ANGLE ± GRAY_ZONE) to catch fragile gray-zone angles; added gray zone PROBLEM detection for 44-47° angles with ambiguous BC matching'

  • v3.1.6 11/04/2026

    Gray zone detection for Best Continuation ambiguity — flags angles in 22–30° and 44–47° zones as PROBLEM when BC matching fails, skips flagging for EXIT instructions

  • v3.1.5 05/04/2026

    Fix to limit item select to segments and nodes only

    he fix builds the complete angles context at each intermediate node (all connected segments), then uses ja_guess_routing_instruction() — the same function that colors regular local turns. This ensures intermediate breadcrumbs inherit all the routing logic: road type hierarchy (Primary vs Street), left-hand traffic, best-continuation detection, and Keep/Exit classification. Now the breadcrumb trail shows consistent colors along the path, matching what you'd see if selecting each segment individually.

    Bumb version and message

  • v3.1.4 04/04/2026

    small ajustment for marker placment

    More robust marker overlap prevention system

  • v3.1.3 04/04/2026

    Implement roundabout turn restriction detection via exit segment query

    Add BigJunction path traversal to detect local turn restrictions at roundabout exits. Replaces direct SDK turn checks (which have LHT direction quirks) with query-based approach:

    • ja_get_roundabout_arc_path(): Constructs arc segment sequence from entry to exit
    • ja_check_roundabout_arc_restricted(): Validates restrictions at final exit via getTurnsToSegment()
    • ja_is_turn_restricted(): Checks if any turn to exit segment has restrictions or isAllowed=false

    Works for both RHT (US) and LHT (UK) roundabouts. Exits with restrictions display as NO_TURN (gray), others show normal markers (colored arrows or ordinal numbers).

    Roundabout turn restriction detection — exits with local restrictions display as NO_TURN (gray), works for RHT and LHT countries

  • v3.1.2 04/04/2026

    Fixed CW Roundabout logic

  • v3.1.1 04/04/2026

    Bumb Version and tame logging

  • v3.1.0 04/04/2026

    Refactor: Centralize Waze spec thresholds and implement full U-turn rules

    This is a comprehensive refactoring that improves code maintainability and correctness by centralizing all magic numbers as named constants and implementing the complete Waze U-turn qualification rules.

    CONSTANTS (NEW):

    • PERPENDICULAR_TOLERANCE (15°) — for roundabout normal/non-normal classification
    • WAZE_MEDIAN_LENGTH_DEFAULT (30m) — default U-turn qualification
    • WAZE_MEDIAN_LENGTH_EXTENDED (50m) — extended threshold with lane guidance
    • WAZE_MEDIAN_LENGTH_THRESHOLD (15m) — optional stricter Waze restriction
    • ROUNDABOUT_INSTRUCTION_*_THRESHOLD — CCW angle ranges for roundabout exits

    U-TURN LOGIC (MAJOR FIX):

    • Refactored ja_classify_uturn_angle() to implement full Waze rules:
      1. Check angle in U-turn range (175° ± GRAY_ZONE)
      2. Check median qualifies (≤30m OR ≤50m with lane guidance on incoming arm)
      3. Check segments parallel (±5°)
      4. Apply optional stricter ≤15m restriction if setting enabled
    • Split double-turn detection into separate paths with independent lane guidance
    • Now correctly shows U-turns in the 15-30m range (previously only checked 15m)

    DOCUMENTATION:

    • Updated ja_collect_double_turns() to document 30m/50m rules and optional 15m restriction
    • Updated 8 function comments to reference constant names instead of hardcoded values
    • All perpendicular tolerance references now use PERPENDICULAR_TOLERANCE

    OPTIMIZATIONS:

    • ja_find_roundabouts() now caches node/segment objects to avoid redundant SDK calls

    OTHER:

    • Version bump 3.0.4 → 3.1.0
    • Deleted experimental WME-Junction-Angle-Info-FAR-TURNS.js branch
    • Added enableFarTurnJB and enableFarTurnPath experimental settings

    All changes maintain backward compatibility while improving code clarity and correctness.

  • v3.0.4 30/03/2026

    New Waze double-turn restriction: apply ≤15 m and ±5° parallelism criteria to mark Waze-blocked U-turn paths

    Layer visibility state now persists to localStorage — JAI remembers if you turned it off

    Automatic marker refresh when turn instructions or restrictions are edited (no deselect/reselect needed)

  • v3.0.3 27/03/2026 Imported from URL
  • v2.2.16 06/02/2025
  • v2.2.15 03/02/2025
  • v2.2.14 01/01/2025
  • v2.2.13 19/09/2024
  • v2.2.12 28/01/2024
  • v2.2.11 13/01/2024
  • v2.2.10 23/12/2023

    Bug fix

  • v2.2.9 23/12/2023

    Version 2.2.9 Layer toggler update
    JAI now uses the "new" Layer menu. Many thanks to Jason (fuji2086) for his support

  • v2.2.8 10/12/2023
  • v2.2.7 09/12/2023
  • v2.2.6 25/11/2023
  • v2.2.5 15/09/2023
  • v2.2.4 17/07/2023
  • v2.2.3 15/07/2023
  • v2.2.1 01/01/2023
  • v2.2.0 24/11/2022
  • v2.1.9 25/08/2021
  • v2.1.8 24/02/2021
  • v2.1.7 06/12/2020
  • v2.1.6 06/12/2020
  • v2.1.5 05/11/2020
  • v2.1.5 05/11/2020
  • v2.1.4 10/06/2020
  • v2.1.3 21/01/2020
  • v2.1.2 19/01/2020
  • v2.1.1 21/11/2019
  • v2.1.0 04/08/2019
  • v2.0.9 17/02/2019 Add UK translation and fix RU translation
  • v2.0.8 31/07/2018 Compatibility for new WME
  • v2.0.7 27/05/2018
  • v2.0.6 23/05/2018
  • v2.0.5 16/05/2018
  • v2.0.4 25/04/2018
  • v2.0.3 02/03/2018
  • v2.0.2 10/01/2018
  • v2.0.1 06/01/2018

Mostra tutte le versioni dello script