-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
212 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* .map-container { | ||
height: 100%; | ||
width: 100%; | ||
} | ||
.map-frame { | ||
height: 100%; | ||
width: 100%; | ||
} */ | ||
|
||
#map { | ||
width: 100%; | ||
height: 100%; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- <div class="page"> --> | ||
<!-- <h3>City Tiles: Liberstad</h3> | ||
<p>Here are the public available City Tiles for purchase.</p> --> | ||
|
||
<div id="map"></div> | ||
|
||
<!-- <mat-card | ||
class="collection-card" | ||
*ngFor="let collection of collections; let i = index" | ||
> | ||
<mat-card-header> | ||
<div mat-card-avatar class="example-header-image"></div> | ||
<mat-card-title>{{ collection.name }}</mat-card-title> | ||
<mat-card-subtitle>{{ collection.title }}</mat-card-subtitle> | ||
</mat-card-header> | ||
<img | ||
mat-card-image | ||
src="https://material.angular.io/assets/img/examples/shiba2.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
<mat-card-content> | ||
<p> | ||
{{ collection.description }} | ||
</p> | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button *ngIf="!collection.collection" mat-stroked-button> | ||
OPEN OFFER</button | ||
> | ||
<button *ngIf="collection.collection" mat-stroked-button> | ||
OPEN COLLECTION</button | ||
> | ||
<button mat-button>SHARE</button> | ||
</mat-card-actions> | ||
</mat-card> --> | ||
|
||
<!-- <mat-card class="collection-card"> | ||
<mat-card-header> | ||
<div mat-card-avatar class="example-header-image"></div> | ||
<mat-card-title>Shiba Inu</mat-card-title> | ||
<mat-card-subtitle>Dog Breed</mat-card-subtitle> | ||
</mat-card-header> | ||
<img | ||
mat-card-image | ||
src="https://material.angular.io/assets/img/examples/shiba2.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
<mat-card-content> | ||
<p> | ||
The Shiba Inu is the smallest of the six original and distinct spitz | ||
breeds of dog from Japan. A small, agile dog that copes very well with | ||
mountainous terrain, the Shiba Inu was originally bred for hunting. | ||
</p> | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-button>LIKE</button> | ||
<button mat-button>SHARE</button> | ||
</mat-card-actions> | ||
</mat-card> | ||
<mat-card class="collection-card"> | ||
<mat-card-header> | ||
<div mat-card-avatar class="example-header-image"></div> | ||
<mat-card-title>Shiba Inu</mat-card-title> | ||
<mat-card-subtitle>Dog Breed</mat-card-subtitle> | ||
</mat-card-header> | ||
<img | ||
mat-card-image | ||
src="https://material.angular.io/assets/img/examples/shiba2.jpg" | ||
alt="Photo of a Shiba Inu" | ||
/> | ||
<mat-card-content> | ||
<p> | ||
The Shiba Inu is the smallest of the six original and distinct spitz | ||
breeds of dog from Japan. A small, agile dog that copes very well with | ||
mountainous terrain, the Shiba Inu was originally bred for hunting. | ||
</p> | ||
</mat-card-content> | ||
<mat-card-actions> | ||
<button mat-button>LIKE</button> | ||
<button mat-button>SHARE</button> | ||
</mat-card-actions> | ||
</mat-card> --> | ||
<!-- </div> --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { ApiService } from '../services/api.service'; | ||
import * as L from 'leaflet'; | ||
|
||
@Component({ | ||
selector: 'app-map', | ||
templateUrl: 'map.component.html', | ||
styleUrls: ['map.component.css'], | ||
}) | ||
export class MapComponent implements OnInit { | ||
collections: any[] = []; | ||
|
||
private map: any; | ||
|
||
constructor(private apiService: ApiService) {} | ||
|
||
async ngOnInit() { | ||
this.map = L.map('map', { | ||
attributionControl: true, | ||
|
||
center: [58.358786, 7.547088], | ||
zoom: 16, | ||
|
||
minZoom: 10, | ||
maxZoom: 22, | ||
// maxBounds: [ | ||
// [58.3, 7.6], | ||
// [58.4, 7.5], | ||
// ], | ||
}); | ||
|
||
// initialize the map on the "map" div with a given center and zoom | ||
// this.map = L.map('map', { | ||
// center: [51.505, -0.09], | ||
// zoom: 13, | ||
// }); | ||
|
||
this.map.attributionControl.setPrefix(''); | ||
|
||
L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { | ||
maxZoom: 19, | ||
attribution: | ||
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>', | ||
}).addTo(this.map); | ||
|
||
this.collections = await this.apiService.categories(); | ||
|
||
// const rawResponse = await fetch(serviceUrl, { | ||
// method: 'POST', | ||
// headers: { | ||
// Accept: 'application/json', | ||
// 'Content-Type': 'application/json', | ||
// }, | ||
// body: jws, | ||
// }); | ||
|
||
// Due to rendering issue on smaller screens / mobile devices, we do this extra refresh here. | ||
// No longer needed due to fix for grid layout (overflow on content, making 100% height staying stable). | ||
// Left as a future example on invalidation if needed. | ||
//this.map.invalidateSize(false); | ||
// this.map.setView([58.35877, 7.54705], 19); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters