Progress and home content

This commit is contained in:
Siroco 2018-09-16 06:05:54 +02:00
parent 7bc9e07e89
commit 2cc298b07e
9 changed files with 292 additions and 7 deletions

View File

@ -0,0 +1,10 @@
soinu-progress {
margin: auto;
float: left;
width: 100%;
text-align: center;
margin-top: 5%;
}
map-box {
}

View File

@ -1,3 +1,3 @@
<h1>{{title}}</h1>
<map-box></map-box>
<map-box *ngIf="isMap"></map-box>
<soinu-progress *ngIf="!isMap"></soinu-progress>
<button pButton label="Map" *ngIf="!isMap" (click)="isMap=true">Map</button>

View File

@ -7,4 +7,5 @@ import { Component } from '@angular/core';
})
export class AppComponent {
title = 'Sartaguda suena';
isMap = false;
}

View File

@ -5,12 +5,14 @@ import { MapService } from './map.service';
import { AppComponent } from './app.component';
import { MapBoxComponent } from './map-box/map-box.component';
import { SoinuProgressComponent } from './soinu-progress/soinu-progress.component';
@NgModule({
declarations: [
AppComponent,
MapBoxComponent
MapBoxComponent,
SoinuProgressComponent
],
imports: [
BrowserModule

View File

@ -37,8 +37,10 @@ export class MapBoxComponent implements OnInit {
this.map = new mapboxgl.Map({
container: 'map',
//style: 'mapbox://styles/mapbox/outdoors-v9',
style: 'mapbox://styles/lrullo/cjm3ppgo50j492snxn2lwak88',
style: 'mapbox://styles/lrullo/cjm4bqlj2b36y2ss4mpq41uxs',
zoom: 13,
pitch: 60, // pitch in degrees
bearing: -60, // bearing in degrees
center: [this.lng, this.lat]
});
@ -92,7 +94,7 @@ export class MapBoxComponent implements OnInit {
type: 'geojson',
data: '/assets/soinumapa.geojson',
cluster:true,
clusterMaxZoom: 20,
clusterMaxZoom: 30,
clusterRadius: 50
})
@ -171,7 +173,7 @@ export class MapBoxComponent implements OnInit {
filter: ["!", ["has", "point_count"]],
layout: {
'icon-image': "icon-red",
'icon-size': 1,
'icon-size': 0.5,
},
paint: {
'icon-opacity': ["case",
@ -195,4 +197,5 @@ https://www.mapbox.com/help/working-with-large-geojson-data/
https://www.mapbox.com/mapbox-gl-js/example/cluster/
https://www.mapbox.com/mapbox-gl-js/example/popup-on-hover/
https://www.mapbox.com/mapbox-gl-js/example/hover-styles/
https://angularfirebase.com/lessons/build-realtime-maps-in-angular-with-mapbox-gl/
----*/

View File

@ -0,0 +1,28 @@
.soinuhex { display:block; opacity:0; transition-duration:1s;}
#hex001 {
animation: hideshow 10s ease infinite;
}
#hex002 {
animation: hideshow 10s 1.5s ease infinite;
}
#hex003 {
animation: hideshow 10s 3s ease infinite;
}
.soinuwave { animation: moveX 100s ease infinite; }
@keyframes hideshow {
0% { opacity:0; }
50% { opacity:1; }
100% { opacity:0; }
}
@keyframes moveX {
0% { transform: translateX(-1px); }
100% { transform: translateX(1px); }
}

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 506 KiB

View File

@ -0,0 +1,25 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { SoinuProgressComponent } from './soinu-progress.component';
describe('SoinuProgressComponent', () => {
let component: SoinuProgressComponent;
let fixture: ComponentFixture<SoinuProgressComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [ SoinuProgressComponent ]
})
.compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(SoinuProgressComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,15 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'soinu-progress',
templateUrl: './soinu-progress.component.html',
styleUrls: ['./soinu-progress.component.css']
})
export class SoinuProgressComponent implements OnInit {
constructor() { }
ngOnInit() {
}
}