I'm using skipLocationChange to navigate between 3 map components: Cesium, Leaflet and Openlayers 3. my Application is preserving location among the components as you can see in mapmip.webiks.com (old version). in order to set the bounds when moving from component to other I'm subscribe to the following function:
setQueryBoundsOnNavigationEnd(event:NavigationEnd):void {
let urlTree:UrlTree = this.leaflet.router.parseUrl(event.url);
urlTree.queryParams['bounds'] = this.getBounds().toString();
extras.skipLocationChange = this.skipLocationChange;
return this.router.navigateByUrl(url, extras);
}
by this way
leaflet.router.events.filter(event => event instanceof NavigationEnd && event.url.includes("/cesium")).take(1).subscribe(this.setQueryBoundsOnNavigationEnd.bind(this));
but when I'm get back form cesium - the url is not hidden anymore.
Thanks in advance !
I was missing unsubsribe(), hence there were NavigationError and the state didn't load properly