diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss
index 254bf4d64..f3159cbc3 100644
--- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss
+++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.scss
@@ -93,6 +93,9 @@
top: 50%;
left: calc(50% - 15px);
z-index: 100;
+ @media (max-width: 767.98px) {
+ top: 550px;
+ }
}
.loading-spinner.widget {
position: absolute;
@@ -103,4 +106,22 @@
@media (max-width: 767.98px) {
top: 250px;
}
-}
\ No newline at end of file
+}
+.loading-spinner.nodepage {
+ position: absolute;
+ top: 200px;
+ z-index: 100;
+ width: 100%;
+ left: 0;
+}
+
+.loading-spinner.channelpage {
+ position: absolute;
+ top: 400px;
+ z-index: 100;
+ width: 100%;
+ left: 0;
+ @media (max-width: 767.98px) {
+ top: 450px;
+ }
+}
diff --git a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts
index 421190d48..91de48186 100644
--- a/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts
+++ b/frontend/src/app/lightning/nodes-channels-map/nodes-channels-map.component.ts
@@ -21,6 +21,7 @@ export class NodesChannelsMap implements OnInit {
@Input() publicKey: string | undefined;
@Input() channel: any[] = [];
@Input() fitContainer = false;
+ @Input() hasLocation = true;
@Output() readyEvent = new EventEmitter();
channelsObservable: Observable
;
@@ -32,7 +33,7 @@ export class NodesChannelsMap implements OnInit {
channelColor = '#466d9d';
channelCurve = 0;
nodeSize = 4;
- isLoading = true;
+ isLoading = false;
chartInstance = undefined;
chartOptions: EChartsOption = {};
@@ -73,6 +74,11 @@ export class NodesChannelsMap implements OnInit {
this.channelsObservable = this.activatedRoute.paramMap
.pipe(
switchMap((params: ParamMap) => {
+ this.isLoading = true;
+ if (this.style === 'channelpage' && this.channel.length === 0 || !this.hasLocation) {
+ this.isLoading = false;
+ }
+
return zip(
this.assetsService.getWorldMapJson$,
this.style !== 'channelpage' ? this.apiService.getChannelsGeo$(params.get('public_key') ?? undefined, this.style) : [''],