WME Cities Overlay

Adds a city overlay for selected states

這裡只顯示彼此間有代碼差異的版本。 顯示所有版本。

  • v2026.03.08.00 2026-03-08

    Add full style customisation, turf.js geometry engine, sidebar power button, and code quality improvements

    • Restored power button in the sidebar tab label (fa-power-off icon, green/grey state) linked bidirectionally to the Cities Overlay layer-switcher checkbox via a new setLayerVisible(value) function
    • Added @turf/turf@7 dependency; replaced all hand-rolled geometry (isPointInPolygon, geoBbox, geomEach, flattenGeoJSON Multi* switch) with turf equivalents — ~120 lines removed
    • Fixed point-in-polygon hole detection (was only testing outer ring; turf.booleanPointInPolygon handles holes correctly)
    • Fixed layer toggle state drift: layerToggled() now uses args.checked (authoritative checkbox state) instead of blindly flipping a boolean
    • Full polygon and label style customisation from the sidebar: stroke/fill colour pickers, opacity sliders with quick-select presets, label colour/outline colour with sync-to-stroke toggles, font size and outline width with zoom-relative Auto mode
    • Quick Presets chip bar (Default, High Contrast, Minimal, Colorblind, Night Mode) replacing the old Reset button
    • Zoom-relative label sizing (hidden below zoom 12; auto-scales 2px per zoom step above 12)
    • Screen polygon caching (ensurePolygonCaches) to avoid redundant turf.polygon + turf.area calls on every label refresh
    • Named default constants replacing single _color literal and scattered magic values
    • Settings expanded and hardened: all new style keys persisted, hasOwnProperty.call used, var -> const/let
    • Deleted dead code: isChecked(), setChecked(), unused geometry variable, orphaned JSDoc
    • Added JSDoc to all previously undocumented functions

    Merge pull request #29 from JS55CT/master

    This PR brings a significant set of enhancements to the Cities Overlay script covering visual customisation, geometry engine improvements, UI polish, power-button restoration, and code quality. All changes are confined to WMECitiesOverlay.js.

  • v2025.08.18.00 2025-08-18

    Added Support for Canada

    Merge pull request #24 from JS55CT/master

    Adding Support for Canada

  • v2025.07.02.00 2025-07-23

    Migrated to the new SDK. Utilized geoKMLer for converting KML to GeoJSON. Introduced flattenGeoJSON() to convert features to meet SDK requirements.

    updaed error handeling for when getTopState() or getTopCountry() fire will Null

    Tamped down logging even more in Non Debug mode. Removed the GEOJSON folder, as we will stick with KML file inputs.

    Remove the DistrictNameDisplay when turning off the Cities Overlay

    Changes to use 'wmeSDK.Map.dangerouslyAddFeaturesToLayerWithoutValidation' to get >100% performace inprovment in load time.

    Small format change for "Dark Mode": Don't change global "label" css.

    Merge pull request #23 from JS55CT/master

    Update for the new SDK

  • v2025.07.02.00 2025-07-23

    Migrated to the new SDK. Utilized geoKMLer for converting KML to GeoJSON. Introduced flattenGeoJSON() to convert features to meet SDK requirements.

    updaed error handeling for when getTopState() or getTopCountry() fire will Null

    Tamped down logging even more in Non Debug mode. Removed the GEOJSON folder, as we will stick with KML file inputs.

    Remove the DistrictNameDisplay when turning off the Cities Overlay

    Changes to use 'wmeSDK.Map.dangerouslyAddFeaturesToLayerWithoutValidation' to get >100% performace inprovment in load time.

    Small format change for "Dark Mode": Don't change global "label" css.

    Merge pull request #23 from JS55CT/master

    Update for the new SDK

  • v2024.04.08.01 2024-04-09

    Update WMECitiesOverlay.js

  • v2023.08.24.01 2023-08-24

    Update WMECitiesOverlay.js

  • v2023.08.24.01 2023-08-24

    Update WMECitiesOverlay.js

  • v2023.03.15.01 2023-03-15 Update WMECitiesOverlay.js
  • v2022.12.29.02 2023-03-15 WazeWrap Tab Creation Update Updated code to support new WazeWrap.Interface.Tab function, Update WMECitiesOverlay.js, Merge pull request #13 from fuji2086/ww-tab WazeWrap Tab Creation Update
  • v2022.12.29.02 2023-03-15 WazeWrap Tab Creation Update Updated code to support new WazeWrap.Interface.Tab function, Update WMECitiesOverlay.js, Merge pull request #13 from fuji2086/ww-tab WazeWrap Tab Creation Update
  • v2022.12.29.02 2022-12-29 Fix parseJSON errors from previous commit
  • v2022.12.29.02 2022-12-29 Fix parseJSON errors from previous commit
  • v2022.12.29.01 2022-12-29 Update WMECitiesOverlay.js
  • v2020.05.22.01 2022-12-29 Use GM_xmlhttpRequest ... to allow fetching data with new CSP in use by WME.
  • v2020.05.22.01 2022-12-29 Use GM_xmlhttpRequest ... to allow fetching data with new CSP in use by WME.
  • v2020.05.22.01 2020-05-22 Update WMECitiesOverlay.js
  • v2020.05.22.01 2020-05-22 Update WMECitiesOverlay.js
  • v2020.03.25.01 2020-03-25 Update WMECitiesOverlay.js
  • v2020.03.25.01 2020-03-25 Update WMECitiesOverlay.js
  • v2019.11.21.01 2019-11-22 Update WMECitiesOverlay.js Tweak for WME update
  • v2019.11.21.01 2019-11-22 Update WMECitiesOverlay.js Tweak for WME update
  • v2019.10.29.01 2019-10-30 Update WMECitiesOverlay.js Update for WME beta changes
  • v2019.10.29.01 2019-10-30 Update WMECitiesOverlay.js Update for WME beta changes
  • v2019.05.03.01 2019-05-03 Update WMECitiesOverlay.js Version bump to pull latest WazeWrap
  • v2019.05.03.01 2019-05-03 Update WMECitiesOverlay.js Version bump to pull latest WazeWrap
  • v2018.09.06.01 2018-09-06 Update WMECitiesOverlay.js Add linter exceptions Fixing loading of the script with the layer off and enabling the layer not hooking the moveend event
  • v2018.08.17.01 2018-08-17 Update WMECitiesOverlay.js
  • v2018.08.03.01 2018-08-17 Update WMECitiesOverlay.js Changing bootstrap to check for W.loginManager.user instead of W.loginManager.isLoggedIn()
  • v2018.08.03.01 2018-08-03 Update WMECitiesOverlay.js Change to *hopefully* keep the city name on the same level as the top bar
  • v2018.08.03.01 2018-08-03 Update WMECitiesOverlay.js Change to *hopefully* keep the city name on the same level as the top bar
  • v2018.07.22.01 2018-07-23 Update WMECitiesOverlay.js
  • v2018.06.26.02 2018-06-26 Update WMECitiesOverlay.js Automatic updates check wasn't first checking if the script is enabled/visible
  • v2018.06.26.01 2018-06-26 Update WMECitiesOverlay.js Added manual and automatic updating of state files
  • v2018.06.22.01 2018-06-22 Update WMECitiesOverlay.js Implementing the use of indexeddb to download the kml files to the local PC. Future update will check the server for updates.
  • v2018.06.05.01 2018-06-05 Update WMECitiesOverlay.js Version incremented to force using the new WazeWrap
  • v2018.05.29.01 2018-05-29 Update SC cities Remove unneded CDPs from SC KML Modify script to use separate variable for repo owner, Merge pull request #3 from crazycaveman/master Update SC KML
  • v2018.05.14.01 2018-05-14 Update WMECitiesOverlay.js Adding a power button in the Cities tab to easily toggle the script layer
  • v2018.05.02.02 2018-05-02 Update WMECitiesOverlay.js Updating WW version pulled
  • v2018.05.02.01 2018-05-02 Update WMECitiesOverlay.js
  • v2018.05.01.02 2018-05-01 Update WMECitiesOverlay.js Removing recreating the OL.Format.KML class - moved to WazeWrap
  • v2018.05.01.01 2018-05-01 Update WMECitiesOverlay.js Removing an instance of Waze.
  • v2018.04.30.04 2018-05-01 Update WMECitiesOverlay.js Support for Mexico states/cities
  • v2018.04.30.03 2018-04-30 Update WMECitiesOverlay.js
  • v2018.04.30.02 2018-04-30 Imported from URL
  • v2018.04.24.01 2018-04-30 Update WMECitiesOverlay.js, Update WMECitiesOverlay.js
  • v2018.04.30.02 2018-04-30 Update WMECitiesOverlay.js
  • v2018.04.30.01 2018-04-30 Update WMECitiesOverlay.js Making it betterer Highlights the currently focused city polygon so it is easier to distinguish when cities bump against each other
  • v2018.04.30.01 2018-04-30 Update WMECitiesOverlay.js Adding a tab & options to toggle filling the polygons and toggling the city labels
  • v2018.04.24.01 2018-04-24 Update WMECitiesOverlay.js Fixing map center lookup determining if it is in a city polygon - some cities have multiple polygons so must loop through all the polygons to check if we are in one of them.
  • v2018.04.23.01 2018-04-23 Update WMECitiesOverlay.js Update to pull state kmls from github with auto detecting the state

顯示所有腳本版本