Greasy Fork is available in English.

WME WV GIS Map

Open a WV GIS map in another window, at the same location as the WME map. Keeps the location of the GIS map synced to WME.

/* eslint-disable max-len */
/* eslint-disable max-classes-per-file */
// ==UserScript==
// @name         WME WV GIS Map
// @namespace    https://greasyfork.org/users/45389
// @version      2024.10.01.001
// @description  Open a WV GIS map in another window, at the same location as the WME map.  Keeps the location of the GIS map synced to WME.
// @author       MapOMatic
// @include     /^https:\/\/(www|beta)\.waze\.com\/(?!user\/)(.{2,6}\/)?editor\/?.*$/
// @include     /^https?:\/\/www\.arcgis\.com\/home\/webmap\/viewer\.html\?webmap=6f496afe68024189b54d823e09550ced.*/
// @license      GNU GPLv3
// @require      https://cdn.jsdelivr.net/npm/@turf/turf@7/turf.min.js
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AABJHElEQVR42u3deZgjV33vf/W0elqjljU2NmDAxgazDia+0J5une9SpZnRMMMSSCANJDFw2fEvrGEJiXECBMIaDGG5FxK2hLCEBAwB57KFQALBIZAQ1rCGJWYJBtsYbLz174+pGmp6eqSSuiSVpLeepx77eUb9kupUnfP5VqnqVKXCixcvXrx48eLV76vTac91Ou1tmWUODw8PDw8Pb7K8fj98fuOCh4eHh4eHN1lev1VHtdNpL2SW6qDVBx4eHh4eHt7ovUE+fKHTaW/PLAtbXBk8PDw8PDy8EXqDfPhip9OuZZbFLa4MHh4eHh4e3gi9QT681um0d2SW2hZXBg8PDw8PD2+EXmrmfeO2Tqdd73TaS5ml3um0tw34wXh4eHh4eHij9+aSiwa35f3wpU6n3cgsS1tcGTw8PDw8PLzReukFhL0LgMyHNzNLY4sr08DDw8PDw8MbqTeXuWugewGQvLme+QI7k/9uZWVSZyceHh4eHh7eSLz0AsLtmQJgrtuba5lTD00aGw8PDw8PbyK99K6BwwVAr0phx4bfHmhsPDw8PDy8yfLqmbsGtnc67Wqv3whqmQJgicbGw8PDw8ObOC/N8LQAWOh26r+aVAhpAVCnsfHw8PDw8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Hh4eHuE/4d7y8vJCq9W6RYjCbnG5j5icKyZ/GCz8WfBwUfDw78HDD8TlM+5+K9oPDw8PD4/wx8PDw8PDwyP88fDw8PDw8Ah/PDw8PDw8wr/Sx91/NDYeHh4eHt5UeOnU/7knCWrQ2Hh4eHh4eBMf/tVcBUDmecJNGhsPDw8PD2+iwz993k/3AiB5cz05+m/S2Hh4eHh4eBMb/ovJ034Xuk79n7y5lhz9NzLPFqax8fDw8PDwJsurJcvhAqBXpbAjUwA0aGw8PDw8PLyJ8+pJnqcFQLXXbwS1TAGwRGPj4eHh4eFNnJdmeFoALHQ79V9NKoS0AKjT2Hh4eHh4eBPnpWfv0wJgsVv4zyfVwfbM7wU0Nh4eHh4e3uR5zUwBUOt10V+2AFjMPUsQjY2Hh4eHh1c2Ly0A6l3zPPmj+cw9goQ/Hh4eHh7e5HrNXNfwZQqAKuGPh4eHh4c38V6+u/cyBQDhj4eHh4eHNyveoMFPY+Ph4eHh4U2HR+Pg4eHh4eER/jQOHh4eHh4e4X/kh2efEdAsYLpgPDw8PDw8vBF6g3x49hkBjQKmC8bDw8PDw8MboTfIh9cz8wsvFTBdMB4eHh4eHt4IvX4/fC7zjIAdmYcLzOHh4eHh4eFNhpea/Xz4YuYZAbUtTheMh4eHh4eHNx5vPu8kQXOZZwSky8IWPxwPDw8PDw9v9F41VwGQefNCZqkW8OF4eHh4eHh44/FyFQDzG5fKFl54eHh4eHh4pfDmelUL2zLL3BY/HA8PDw8PD68k3v8PWEjixIjH8ycAAAAASUVORK5CYII=
// ==/UserScript==

/* global W */
/* global turf */

(function main() {
    'use strict';

    class WMECode {
        static mapWindow;

        static getMercatorMapExtent() {
            const wgs84Extent = W.map.getExtent();
            const wgs84LeftBottom = [wgs84Extent[0], wgs84Extent[1]];
            const wgs84RightTop = [wgs84Extent[2], wgs84Extent[3]];
            const mercatorLeftBottom = turf.toMercator(wgs84LeftBottom);
            const mercatorRightTop = turf.toMercator(wgs84RightTop);
            return [mercatorLeftBottom[0], mercatorLeftBottom[1], mercatorRightTop[0], mercatorRightTop[1]];
        }

        static onButtonClick() {
            const wazeExt = this.getMercatorMapExtent();
            let url = 'http://www.arcgis.com/home/webmap/viewer.html?webmap=6f496afe68024189b54d823e09550ced&extent=';
            url += `${wazeExt[0]}%2C${wazeExt[1]}%2C${wazeExt[2]}%2C${wazeExt[3]}%2C102113`;
            if (!this.mapWindow || this.mapWindow.closed) {
                this.mapWindow = window.open(null, 'wv_gis_map');
                try {
                    this.mapWindow.location?.assign(url);
                } catch (e) {
                    if (e.code === 18) {
                        // Ignore if accessing location.href is blocked by cross-domain.
                    } else {
                        throw e;
                    }
                }
            }
            this.mapWindow.focus();
            this.postMessage();
        }

        static postMessage() {
            if (this.mapWindow && !this.mapWindow.closed) {
                const extent = this.getMercatorMapExtent();
                this.mapWindow.postMessage({
                    type: 'setExtent',
                    xmin: extent[0],
                    xmax: extent[2],
                    ymin: extent[1],
                    ymax: extent[3]
                }, 'https://www.arcgis.com');
            }
        }

        static init() {
            $('.WazeControlPermalink').prepend(
                $('<div>').css({ float: 'left', display: 'inline-block', padding: '0px 5px 0px 3px' }).append(
                    $('<div>', { id: 'wv-gis-button', title: 'Open the WV GIS map in a new window' })
                        .text('WVGIS')
                        .css({
                            float: 'left', textDecoration: 'none', color: '#000000', fontWeight: 'bold', cursor: 'pointer'
                        })
                        .click(this.onButtonClick.bind(this))
                )
            );

            setInterval(() => {
                const $btn = $('#wv-gis-button');
                if ($btn.length > 0) {
                    $btn.css('color', (this.mapWindow && !this.mapWindow.closed) ? '#1e9d12' : '#000000');
                }
            }, 500);

            /* Event listeners */
            W.map.events.register('moveend', null, this.postMessage.bind(this));
        }

        static bootstrap() {
            if (typeof W === 'object' && W.userscripts?.state.isReady) {
                this.init();
            } else {
                document.addEventListener('wme-ready', this.init.bind(this), { once: true });
            }
        }
    }

    class GISMapCode {
        static Extent;
        static SpatialReference;

        static receiveMessage(message) {
            const { data } = message;
            switch (data.type) {
                case 'setExtent': {
                    const extent = new this.Extent({
                        xmin: data.xmin,
                        xmax: data.xmax,
                        ymin: data.ymin,
                        ymax: data.ymax,
                        spatialReference: new this.SpatialReference({ wkid: 102113 })
                    });
                    unsafeWindow.arcgisonline.map.main.map.setExtent(extent);
                    break;
                }
                default:
                    // Add more types as needed...
            }
        }

        static init() {
            window.addEventListener('message', this.receiveMessage.bind(this));
        }

        static bootstrap() {
            // There may be a more elegant way to check that these modules are ready...
            try {
                this.Extent = unsafeWindow.require('esri/geometry/Extent');
                this.SpatialReference = unsafeWindow.require('esri/SpatialReference');
                this.init();
            } catch {
                setTimeout(this.bootstrap.bind(this), 200);
            }
        }
    }

    function bootstrap() {
        if (window.location.host.toLowerCase() === 'www.arcgis.com') {
            GISMapCode.bootstrap();
        } else {
            WMECode.bootstrap();
        }
    }

    bootstrap();
})();