@@ -12,47 +12,64 @@ import { Component, OnInit } from '@angular/core';
1212 <aol-layer-tile [opacity]="1"> <aol-source-osm></aol-source-osm> </aol-layer-tile>
1313
1414 <aol-layer-group>
15- <aol-layer-vector *ngFor="let feature of features">
16- <ng-container [ngSwitch]="feature.geometry.type">
17- <aol-source-vector *ngSwitchCase="'Polygon'">
18- <aol-style>
19- <aol-style-stroke [color]="'rgba(90, 17, 26)'" width="3"></aol-style-stroke>
20- <aol-style-fill [color]="'rgba(90, 17, 26, 0.5)'"></aol-style-fill>
21- </aol-style>
22- <aol-feature>
23- <aol-geometry-polygon>
24- <aol-collection-coordinates [coordinates]="feature.geometry.coordinates[0]" [srid]="'EPSG:4326'">
25- </aol-collection-coordinates>
26- </aol-geometry-polygon>
27- </aol-feature>
28- </aol-source-vector>
29- <aol-source-vector *ngSwitchCase="'Point'">
30- <aol-feature>
31- <aol-geometry-point>
32- <aol-coordinate
33- [x]="feature.geometry.coordinates[0]"
34- [y]="feature.geometry.coordinates[1]"
35- [srid]="'EPSG:4326'"
36- >
37- </aol-coordinate>
38- <aol-style>
39- <aol-style-circle [radius]="10">
40- <aol-style-stroke [color]="'black'" [width]="width"></aol-style-stroke>
41- <aol-style-fill [color]="'green'"></aol-style-fill>
42- </aol-style-circle>
43- </aol-style>
44- </aol-geometry-point>
45- </aol-feature>
46- </aol-source-vector>
47- <aol-source-vector *ngSwitchCase="'LineString'">
48- <aol-feature>
49- <aol-geometry-linestring>
50- <aol-collection-coordinates [coordinates]="feature.geometry.coordinates" [srid]="'EPSG:4326'">
51- </aol-collection-coordinates>
52- </aol-geometry-linestring>
53- </aol-feature>
54- </aol-source-vector>
55- </ng-container>
15+ <aol-layer-vector *ngFor="let feature of features" [ngSwitch]="feature.geometry.type">
16+ <aol-source-vector *ngSwitchCase="'Polygon'">
17+ <aol-style>
18+ <aol-style-stroke [color]="'rgba(90, 17, 26)'" width="3"></aol-style-stroke>
19+ <aol-style-fill [color]="'rgba(90, 17, 26, 0.5)'"></aol-style-fill>
20+ </aol-style>
21+ <aol-feature>
22+ <aol-geometry-polygon>
23+ <aol-collection-coordinates [coordinates]="feature.geometry.coordinates[0]" [srid]="'EPSG:4326'">
24+ </aol-collection-coordinates>
25+ </aol-geometry-polygon>
26+ </aol-feature>
27+ </aol-source-vector>
28+
29+ <aol-source-vector *ngSwitchCase="'Point'">
30+ <aol-feature>
31+ <aol-geometry-point>
32+ <aol-coordinate
33+ [x]="feature.geometry.coordinates[0]"
34+ [y]="feature.geometry.coordinates[1]"
35+ [srid]="'EPSG:4326'"
36+ >
37+ </aol-coordinate>
38+ <aol-style>
39+ <aol-style-circle [radius]="10">
40+ <aol-style-stroke [color]="'black'" [width]="width"></aol-style-stroke>
41+ <aol-style-fill [color]="'green'"></aol-style-fill>
42+ </aol-style-circle>
43+ </aol-style>
44+ </aol-geometry-point>
45+ </aol-feature>
46+ </aol-source-vector>
47+
48+ <aol-source-vector *ngSwitchCase="'LineString'">
49+ <aol-feature>
50+ <aol-geometry-linestring>
51+ <aol-collection-coordinates [coordinates]="feature.geometry.coordinates" [srid]="'EPSG:4326'">
52+ </aol-collection-coordinates>
53+ </aol-geometry-linestring>
54+ </aol-feature>
55+ </aol-source-vector>
56+
57+ <aol-source-vector *ngSwitchCase="'Circle'">
58+ <aol-feature>
59+ <aol-geometry-circle [radius]="feature.geometry.radius">
60+ <aol-coordinate
61+ [x]="feature.geometry.coordinates[0]"
62+ [y]="feature.geometry.coordinates[1]"
63+ srid="EPSG:4326"
64+ >
65+ </aol-coordinate>
66+ <aol-style>
67+ <aol-style-stroke color="blue" width="2"></aol-style-stroke>
68+ <aol-style-fill color="rgba(255, 255, 0, 0.5)"></aol-style-fill>
69+ </aol-style>
70+ </aol-geometry-circle>
71+ </aol-feature>
72+ </aol-source-vector>
5673 </aol-layer-vector>
5774 </aol-layer-group>
5875 </aol-map>
@@ -100,6 +117,15 @@ export class DisplayGeometryComponent implements OnInit {
100117 ] ,
101118 } ,
102119 } ,
120+ {
121+ type : 'Feature' ,
122+ properties : { } ,
123+ geometry : {
124+ type : 'Circle' ,
125+ coordinates : [ 3.1060516834259033 , 45.78940226200967 ] ,
126+ radius : 50000 ,
127+ } ,
128+ } ,
103129 ] ;
104130
105131 ngOnInit ( ) { }
0 commit comments