From df82157a6f220cdca073132d33d632aea6c576cd Mon Sep 17 00:00:00 2001 From: cbourget Date: Tue, 5 Feb 2019 11:50:42 -0500 Subject: [PATCH] fix(query): wms version support in query service --- .../geo/src/lib/query/shared/query.service.ts | 20 ++++++------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/projects/geo/src/lib/query/shared/query.service.ts b/projects/geo/src/lib/query/shared/query.service.ts index 6faf32f1cd..74911f963b 100644 --- a/projects/geo/src/lib/query/shared/query.service.ts +++ b/projects/geo/src/lib/query/shared/query.service.ts @@ -168,17 +168,9 @@ export class QueryService { const bboxRaw = searchParams['bbox']; const width = parseInt(searchParams['width'], 10); const height = parseInt(searchParams['height'], 10); - const wmsVersion = searchParams['version']; - let xPosition; - let yPosition; - - if (wmsVersion === '1.3.0') { - xPosition = parseInt(searchParams['i'], 10); - yPosition = parseInt(searchParams['j'], 10); - } else { - xPosition = parseInt(searchParams['x'], 10); - yPosition = parseInt(searchParams['y'], 10); - } + const xPosition = parseInt(searchParams['i'] || searchParams['x'], 10); + const yPosition = parseInt(searchParams['j'] || searchParams['y'], 10); + const projection = searchParams['crs'] || searchParams['srs'] || 'EPSG:3857'; const bbox = bboxRaw.split(','); let threshold = @@ -258,12 +250,12 @@ export class QueryService { return [ { id: uuid(), - source: 'title', + source: undefined, type: FeatureType.Feature, format: FeatureFormat.GeoJSON, - title: 'title', + title: undefined, icon: iconHtml, - projection: 'EPSG:3857', + projection: projection, properties: { target: targetIgo2, body: res, url: url }, geometry: { type: f.getType(), coordinates: f.getCoordinates() } }