|
@@ -4,4 +4,32 @@ import {Injectable} from '@angular/core';
|
|
|
@Injectable({providedIn: 'root'})
|
|
@Injectable({providedIn: 'root'})
|
|
|
export class IrrigationService {
|
|
export class IrrigationService {
|
|
|
constructor(private httpClient: HttpClient) {}
|
|
constructor(private httpClient: HttpClient) {}
|
|
|
|
|
+
|
|
|
|
|
+ getValues() {
|
|
|
|
|
+ const params = {
|
|
|
|
|
+ 'SERVICE': 'WMS',
|
|
|
|
|
+ 'VERSION': '1.3.0',
|
|
|
|
|
+ 'REQUEST': 'GetFeatureInfo',
|
|
|
|
|
+ 'FORMAT': 'image/png',
|
|
|
|
|
+ 'QUERY_LAYERS': 'water_surface_latest',
|
|
|
|
|
+ 'LAYERS': 'water_surface_latest',
|
|
|
|
|
+ 'INFO_FORMAT': 'text/plain',
|
|
|
|
|
+ 'I': 100,
|
|
|
|
|
+ 'J': 129,
|
|
|
|
|
+ 'WIDTH': 256,
|
|
|
|
|
+ 'HEIGHT': 256,
|
|
|
|
|
+ 'CRS': 'EPSG:3857',
|
|
|
|
|
+ 'STYLES': '',
|
|
|
|
|
+ 'BBOX':
|
|
|
|
|
+ '2037505.4259696566,6130861.164697416,2038728.4184222193,6132084.157149979',
|
|
|
|
|
+ };
|
|
|
|
|
+ this.httpClient
|
|
|
|
|
+ .get('https://www.gis.atapex.sk/geoserver/agrihub/wms', {
|
|
|
|
|
+ params,
|
|
|
|
|
+ responseType: 'text',
|
|
|
|
|
+ })
|
|
|
|
|
+ .subscribe((data) => {
|
|
|
|
|
+ console.log(data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|