src/gm3/trackers/hash.js
/* Restore the location from the hash
     *
     */
Restore the location from the hash
Restore the location from the hash
restoreLocation(loc) {
        const zxy = loc.split(this.joinSymbol).map(parseFloat);
        this.store.dispatch(mapActions.setView({
            zoom: null,
            center: [zxy[1], zxy[2]],
            resolution: zxy[0]
        }));
    }
restoreLocation ( loc ) { const zxy = loc . split ( this . joinSymbol ) . map ( parseFloat ) ; this . store . dispatch ( mapActions . setView ( { zoom : null , center : [ zxy [ 1 ] , zxy [ 2 ] ] , resolution : zxy [ 0 ] } ) ) ; }
Restore the location from the hash
Restore the location from the hash
// I wholly believe that map/forEach is evil, //  but this code is rather elegant when written this way. // unset the "zoom level" which normally takes precendent.